Constraint reference frames need better documentation

Post Reply
Walrus
Posts: 2
Joined: Sat Dec 01, 2012 2:15 am

Constraint reference frames need better documentation

Post by Walrus »

I've recently been working on a project where I needed to dynamically create constraints on contact, a project which has revealed to me the woeful state of documentation for the creation of constraints.

There are a number of places where the documentation falls a bit short, but the biggest area was with the btTransform reference frames (frameA, frameB) and the useLinearReferenceFrameA argument.

I eventually discovered that the best way to create a constraint at the point of contact was to use the contact manifold's m_localPoint fields for the origins and the inverse of the rigid body's rotation to get the desired effect. Much of this wound up being through trial and error though, and I still have a few things that are unclear, and should probably be added to the documentation & wiki.

1: Why does the constraint become 'sloppy' when the frames are offset?
2: What exactly does the useLinearReferenceFrameA do?
3: What are the best practices expected for dynamicly creating constraints? All the samples show them being constructed statically based on arbitrary vectors which can make it difficult to discern their relationships.
Post Reply