I am trying to make a simple 2d pinball game to learn physics and joints. But I am having problems trying to figure out the angle limits of the hinge joints.
I am creating the flipper parts of the pinball, so when the game starts each flipper should point down. But for some reason the right one starts in the upper position and i cant figure out why.
In the image blow ive shown how the hingejoints are setup. The right hingeJoint I set its rotation to -180 to see if that would help, but hasnt seem to have done much. The last image shows how the right flipper points upwards when the game is running. Does anyone possibly notice any issue I have with my joints that I am missing
Your right joint has a rotation of -180, while it’s angle limits are from 30 to -30. Naturally -180 is not between these so it’s going to snap to either of the two.
If -180 is the default, then your limits should 30 degrees +/- of this value.
I had changed it to -180 in hopes it would fix it, but now that you explained it I can see why it wouldnt. But i found out the issue. It had to do with the speed I was using to move the flippers, and nothing to do with how i had set it up. I had used the same speed for both the left and the right, where as the right should have been -speed.