BhkHingeConstraint

From GECK
Jump to: navigation, search

bhkHingeConstraint is a Havok constraint that defines an axis for a bhkRigidBody to rotate in relation to another bhkRigidBody. They are used for merry-go-rounds, globes, and a handful of skeletons.

Its fields are:

  • Num Entities: The number of bhkRigidBody blocks used in the hinge constraint. Should always be two, the first is the rigid body you wish to attach and the second is the rigid body you wish to attach to.
  • Priority: Determines the Havok constraint priority type, usually 1.
  • Axis A: The axis of rotation for the constraint, in quaternions. Orthogonal to the circular plane on which the bodies are to rotate. (Ranges from 0-1)
  • Perp Axis In A1: The vector in the rotation plane which defines the zero angle, in quaternions. This is arbitrary but useful for offsetting the angle limits. It must not be orthogonal to the rotation plane.
  • Perp Axis In A2: The vector in the rotation plane which defines the positive direction of rotation, in quaternions. It must be the equal to the vector product of Axle A and Perp2 Axle in A1 (i.e., it must be orthogonal to Perp2 Axle in A1 but not the rotation plane).
  • Pivot A: The pivot point of the first bhkRigidBody under Entities.
  • Axis B: The axis of rotation for the constraint, in quaternions, in the second bhkRigidBody's local space.
  • Perp Axis In B1: The vector in the rotation plane which defines the zero angle, in quaternions, in the second bhkRigidBody's local space.
  • Perp Axis In B2: The vector in the rotation plane which defines the positive direction of rotation, in quaternions, in the second bhkRigidBody's local space.
  • Pivot B: The pivot point of the second bhkRigidBody where the first attaches to.

Notes

Converting from A to B manually is usually unnecessary, as NifSkope has a function to convert it in most cases. Simply right click on the constraint in the list view, and do Havok> A->B.

See Also

bhkLimitedHingeConstraint