I am working on a game where the physics bodies do not rotate at all. I am using the preventRotation flag (set to true) on the body to achieve this. Thats working good. The problem is that some of these bodies have joints generated at run-time (to other dynamic objects) and these seem to conflict with the preventRotation. When I create a new joint then both bodies just snap to the 0,0 of the screen. I am testing with both prismatic and distance joints which show the same issue. What exactly am I doing wrong here?
I managed to get this situation somewhat working by setting the preventRotation to true only on one of the jointed bodies. That appears to work for 2 bodies at a time. However I plan on having multiple joints created (not necessarily only one per body) so I can see this situation getting tricky. I also tried setting the m_invI to 0.0 directly, but this seem to do the same thing as preventRotation. So basically how do I deal with this situation of multiple non-rotating bodies with interconnecting joints?
I managed to get this situation somewhat working by setting the preventRotation to true only on one of the jointed bodies. That appears to work for 2 bodies at a time. However I plan on having multiple joints created (not necessarily only one per body) so I can see this situation getting tricky. I also tried setting the m_invI to 0.0 directly, but this seem to do the same thing as preventRotation. So basically how do I deal with this situation of multiple non-rotating bodies with interconnecting joints?