Page 1 of 1

btConeTwistConstraint for single body

Posted: Wed Mar 22, 2017 9:33 pm
by JamesCLucas
I'm having trouble implementing the btConeTwistConstraint. The only example I can ever find is a rag doll scenario.

I'm trying to create a single box shape that will swing like a pendulum in the two directions. So I'm imagining the cone opening downward with the point or pivot point above the box.

Do I need a second rigid body to make this work? The pivot point always seems to end up at the origin for me.

Re: btConeTwistConstraint for single body

Posted: Wed Apr 05, 2017 6:19 pm
by benelot
No, you do not need a second rigid body, you can attach the constraint to the world frame. Look at the constraints demo in the bullet example browser. There it should show exactly what you want to do.