Revolute Joint Limits not working properly

Topics: User Forum
Jan 7, 2011 at 6:21 AM
Edited Jan 7, 2011 at 6:43 AM

i made a worm/snake with revolute joints and set limits enable

        a.LimitEnabled      = true;
        a.LowerLimit        = -3.1416f / 5.0f;
        a.UpperLimit        = 3.1416f / 5.0f;

Everything works great at high FPS, but when i run the program at 60 fps, the snake in some cases can pass the limits and make for example a knot .

http://dl.dropbox.com/u/7064342/2011-01-07_03-09.jpg

then the part return slowly to the nearest limit.

i dont know if is a bug or an error in my code.

how i can fix this and make that the rovelute joint never pass the limits?

i am using XNA 4.0 and Farseer 3.2 but in 3.1 a had the same problem.


thanks








 

Developer
Jan 7, 2011 at 2:32 PM

If it works at higher FPS you can try to increase the VelocityIterations and PositionIterations in Settings.cs. That should enhance the stability of the simulation at the cost of some performance.

Jan 7, 2011 at 3:33 PM

its works thanks!