basic question on hinge constraint

Post Reply
zeder3d
Posts: 4
Joined: Tue Mar 22, 2011 9:11 am

basic question on hinge constraint

Post by zeder3d »

Hello,

I'm confused about how to use btHingeConstraint. In particular, I don't understand what is the difference between Axis, and Pivot parameters in the constructor.
Thank you in advance

Z.
fwip
Posts: 1
Joined: Tue Apr 12, 2011 4:07 pm

Re: basic question on hinge constraint

Post by fwip »

I'm pretty new to Bullet, but I think I know this one. The 'Axis' represents the orientation of the joint, relative to the part. For example, a door would have an axis of (0,1,0), assuming that y is up. A trashcan lid might have an axis of (1,0,0).

The 'Pivot' is the point that attaches to the joint, relative to the object. In my case, I've found it useful to specify a point a little outside of each body. If the pivot point is in the object, the constraint will try to put the objects overlapping one another. Some people recommend disabling collisions between the two constrained objects, partly for this reason.
Post Reply