BulletGenericConstraint takes two 'frame' arguments, each being a TransformState object. I believe you can use these to specify a relative rotation between the two bodies being affected by the constraint.
The TransformState interface is a bit tricky to work with, but it's easy to use once you get the hang of it. Transform states use a special kind of cache that causes them to be immutable. Every setX operation you perform on it does not modify the object, but instead returns a new TransformState object with the requested operation applied.
It is perhaps easiest to use a TransformState object that has already been applied on a node, using getTransform()
, getNetTransform()
, or getTransform(otherNode)
. Or, you can construct a TransformState object from a translation and a set of HPR angles:
ts = TransformState.makePosHpr(pos, hpr)