Open Silverlan opened 1 year ago
The ellipse swing limit has some iffy behavior in some corner cases which is part of the reason I didn't bring it forward to bepuphysics2, but if it keeps working well across your use cases for a while longer I'll pull this in.
Implements a IK swing limit which allows you to specify separate x and y angles.
The implementation is a combination of the IKSwingLimit and the EllipseSwingLimit from the physics sub-system.
I don't quite understand the math behind the calculation of the error value, so I'm not sure if this part is quite correct: https://github.com/Silverlan/bepuphysics1/blob/b276b8a5bb3d66519ed5a2757bcb782c5482d3d6/BEPUik/IKEllipseSwingLimit.cs#L143 I have not noticed any issues in my tests, however.