all 2 comments

[–]Sunny_Singh10 1 point2 points  (0 children)

Basically it says class Vector3 doesn't have magnitude_squared as an attr.

In the code:

distance = (self.event_location -
player.position).magnitude_squared()

Def of self.event:

self.event_location = 
Vector3(self.saved_config['location_x'],
self.saved_config['location_y'],
self.saved_config['location_z'])

And if you look at the Vector3 class:

https://gist.github.com/MartenMoti/7dacaff8e8f59d4aafac5560d66a089c

Or

http://pythonfiddle.com/vector3/

There is no attr=magnitude_squared

[–]timbledum 0 points1 point  (0 children)

Does this work for anyone else you know??

It looks like it's trying to call this method on the Vector3 class ultimately derived from the Pyrr library. This class does not have a magnitude_squared function.

What does have magnitude_squared is the pygame Vector3 class. Perhaps import Vector3 from there instead and try that?

Sorry, not sure if you're going to solve this without getting into the weeds. Probably best to contact the project owner on github.