-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't add to vector length when length is 0 #94
Comments
From the user's point of view this seems like a reasonable request, I can see how it would be useful. However, Im a bit concerned about two things:
The second one is the most serious one, I dont immediately see what a good solution would be.. Not sure if this feature would be useful if you couldnt use it to keep the information about pymunk objects, only free Vec2d objects. |
I see, thanks for the extra info, didn't realize about point # 2. That certainly seems like a challenge. Almost seems like a request for Chipmunk directly then. In my current project I'm now caching the vector so if it's 0,0 I grab the cached one and use that to perform my calculation. |
Would be nice for it to remember the last 'direction' it was in to be able to up it's speed once an object has stopped.
Currently throws:
File "pymunk\vec2d.pyo", line 310, in __setlength
ZeroDivisionError: float division by zero
Though with the convention set in get_angle that the angle is zero if the length is zero, I would at least expect it to increase the vector in that direction.
Thanks
The text was updated successfully, but these errors were encountered: