PxD6JointCreate_Distance#
Defined in include/extensions/PxD6JointCreate.h
- PxJoint *PxD6JointCreate_Distance(
- PxPhysics &physics,
- PxRigidActor *actor0,
- const PxVec3 &localPos0,
- PxRigidActor *actor1,
- const PxVec3 &localPos1,
- float maxDist,
- bool useD6,
Helper function to create a distance joint, using either a PxD6Joint or PxDistanceJoint.
This helper function only supports a maximum distance constraint, because PxD6Joint does not support a minimum distance constraint (contrary to PxDistanceJoint).
The distance is computed between the joint frames’ world-space positions. The joint frames’ orientations are irrelevant here so the function sets them to identity.
See also
- Parameters:
physics – [in] The physics SDK
actor0 – [in] An actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
localPos0 – [in] The position of the joint relative to actor0
actor1 – [in] An actor to which the joint is attached. NULL may be used to attach the joint to a specific point in the world frame
localPos1 – [in] The position of the joint relative to actor1
maxDist – [in] The maximum allowed distance
useD6 – [in] True to use a PxD6Joint, false to use a PxDistanceJoint;
- Returns:
The created joint.