pub unsafe extern "C" fn PxArticulationJointReducedCoordinate_setDriveTarget_mut(
    self_: *mut PxArticulationJointReducedCoordinate,
    axis: PxArticulationAxis,
    target: f32,
    autowake: bool
)
Expand description

Sets the joint drive position target for the given axis.

The target units are linear units (equivalent to scene units) for a translational axis, or rad for a rotational axis.

This call is not allowed while the simulation is running.

For spherical joints, target must be in range [-Pi, Pi].

The target is specified in the parent frame of the joint. If Gp, Gc are the parent and child actor poses in the world frame and Lp, Lc are the parent and child joint frames expressed in the parent and child actor frames then the joint will drive the parent and child links to poses that obey Gp * Lp * J = Gc * Lc. For joints restricted to angular motion, J has the form PxTranfsorm(PxVec3(PxZero), PxExp(PxVec3(twistTarget, swing1Target, swing2Target))). For joints restricted to linear motion, J has the form PxTransform(PxVec3(XTarget, YTarget, ZTarget), PxQuat(PxIdentity)).

For spherical joints with more than 1 degree of freedom, the joint target angles taken together can collectively represent a rotation of greater than Pi around a vector. When this happens the rotation that matches the joint drive target is not the shortest path rotation. The joint pose J that is the outcome after driving to the target pose will always be the equivalent of the shortest path rotation.