General Box2D issues or C++ specific issues
3 posts • Page 1 of 1
I have a revolute joint with an upper limit of 100, and a lower limit of 30. When i enable the motor to go one way it goes past the limit on that side, and when i try to get it going the other way it gets stuck for about 2 steps on average. For example the revolute joint will stop at 100.3 or even 101 sometimes, and 29 or 28.5. I think it's because the revolute joint is going past the limit, and the joint is getting stuck beyond the limit for a few steps. My motor torque is extremely high because i want instant movement, so it's not because the torque is low. Any suggestions?
I've solved it. The revolute joint was indeed getting stuck beyond the limit. I ended up changing the limits to 110 and 20, pretty much adding 10 more degrees of freedom on both ends. Then I manually stopped the revolute joint (motorSpeed = 0) when it got past 100 or 30. It now moves simultaneously back and forth, and never goes past the limits. But it still stops when it needs to.
Helped me! Lost 2 hours on another solutions!
Who is online
Users browsing this forum: No registered users and 1 guest