How do I adjust getHingeAngle to be continuous?

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
BlGene
Posts: 5
Joined: Mon Sep 20, 2010 1:59 pm

How do I adjust getHingeAngle to be continuous?

Post by BlGene »

Hello All,

I have set up my bodies and joints, but for some joints the initial getHingeAngle value ends up being close to pi, then while running the simulation the the getHingeAngle values will jump from being around pi to being around -pi. Does anyone know of an elegant way of calculating more continuous values.

As my joints don not rotate completely I am thinking of storing the initial angle in the HingeConstraint instance and rotating the angles so that the initial angle becomes 0.

I have attached a graph of the hinge angle values,

Thanks for any help in advance
BR,
Attachments
Somewhat problematic data
Somewhat problematic data
joint1.png (4.21 KiB) Viewed 6274 times
Post Reply