This project has moved and is read-only. For the latest updates, please go here.

Joint Position

Sep 17, 2009 at 4:43 AM


I converted the Box2DX prismatic and distance joints to Physics2D.NET. However, the joints use position correction, and this messes with any bodies that are attatched to that body or sitting on the body because they don't pick up the body's velocity.  Is there some way I can get around this?

I am using the 2 joints together to make a piston, and moving it back and forth by adjusting the length of the distance joint. If there is a body resting on top of one of the piston bodies, it just sits there and doesn't move with the body it's resting on. Maybe its the adjusting of the length of the distance joint that messes with it, because it uses position correction to get back to the right length?

I probably need to use ApplyImpulse instead of directly setting the position, but would the joint still work?

I'm posting this here because Physics2D.NET and Farseer are pretty similar, and also Genbox is working on BoX2DX at the moment so maybe he can help.

Im also gonna try use the Pin joint from Farseer instead of the distance joint, but it'l take some time to convert it though. 

Thanks anyone who can help me out.

Sep 17, 2009 at 6:27 AM

I converted the Pin and Slider Joints from Farseer and they work perfectly! Took much quicker than I thought. If I'd know that Box2D's joints worked differently I would've done this straight away. I'm still using the prismatic joint though but it's not giving any problems. Cheers!