btConeTwistConstraint for single body

Post Reply
JamesCLucas
Posts: 2
Joined: Tue Mar 07, 2017 2:31 am

btConeTwistConstraint for single body

Post 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.
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: btConeTwistConstraint for single body

Post 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.
Post Reply