pub unsafe extern "C" fn PxRigidBody_addTorque_mut(
    self_: *mut PxRigidBody,
    torque: *const PxVec3,
    mode: PxForceMode,
    autowake: bool
)
Expand description

Applies an impulsive torque defined in the global coordinate frame to the actor.

::PxForceMode determines if the torque is to be conventional or impulsive.

Each actor has an angular acceleration and an angular velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively. The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same accumulators and are just short hand for multiplying the vector parameter by inverse inertia and then using PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively.

It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.

The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.

if this called on an articulation link, only the link is updated, not the entire articulation.

see [PxRigidBodyExt::computeVelocityDeltaFromImpulse] for details of how to compute the change in angular velocity that will arise from the application of an impulsive torque, where an impulsive torque is an applied torque multiplied by a timestep.

Sleeping: This call wakes the actor if it is sleeping, and the autowake parameter is true (default) or the torque is non-zero.