You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if you can make a case for it being a common enough use case to create a prismatic joint with localAxisA of 0, I would suggest the fix should go into that contructor rather than into Vector2.Normalize
Description
When applying a Prismatic Joint, the localAxisA is normalized. This causes
{NaN, NaN}
when the joint isnew Vector2(0,0)
See
box2d-netstandard/src/box2dx/Box2D.NetStandard/Dynamics/Joints/Prismatic/PrismaticJoint.cs
Line 146 in b34d623
How To Reproduce
Create a new prismatic joint where the
localAxisA
isnew Vector2(0,0)
You can work around the issue by using Reflection to update the private values:
Expected Behavior
Something similar to:
https://github.com/erincatto/box2d/blob/c6cc3646d1701ab3c0750ef397d2d68fc6dbcff2/src/dynamics/b2_prismatic_joint.cpp#L88
The text was updated successfully, but these errors were encountered: