jBullet - 6DOFConstraint severe oscillation

129 Views Asked by At

I have made a simple multi-cyclinder snake body. I have a 6DOFConstraint between each body and the angles are controlled by increasing/decreasing the upper and lower limits of the rotation as such to change the angle.

Rotation about the horizontal axis works fine, but once an angle of about 1.05rads is reached when rotating about the vertical axis the two bodies vibrate vigorously.

screen captures can be found here, the description of which walks through what I do in more detail:

http://www.youtube.com/watch?v=OQu-YyxLvbw

The following screen capture shows the "head" of the snake separated linearly with the constraint still in place, as to try to remove the likelihood of a collision problem occurring:

http://www.youtube.com/watch?v=6wso6HDjqXA

I have tried the following techniques to solve the problem, none of which have worked:

  • Setting restitution (bounciness) to very low –same occurs
  • Set both linear and angular damping to a range of values between 0
    and 1 – same occurs
  • Set angle to begin at greater than 1.05 – same occurs.
  • Continue to increase angle beyond 1.05 to see if calms down – opposite occurs and it gets more violent.
  • Try on single joint – same occurs
  • Check for deep penetrations – none present
  • Separate two bodies linearly to rule out collision problem but keep the joint the same – same occurs.
  • Float the snake (mass = 0f for all parts other than head) above ground to remove ground interaction – same occurs
  • Turn off gravity whilst in locked position – behaviour delayed until 1.43rads
  • Increase the size (scale) of the snake as it is known for jBullet to have rendering issues with smaller items – no change.
  • Tried changing bodies to capsule shapes – no change
0

There are 0 best solutions below