Skip to content

format

typescript
Rigidbody.AddRelativeForce(force, mode)

class: Rigidbody

description

Add a force to the Rigidbody in its local coordinate system.

This method can be used to apply a force at a specific position on the Rigidbody, rather than directly at its center. This allows for more precise and detailed physics simulation.

parameter

param_nametypedescription
forceVector3The force to be applied.
modeForceModeThe type of force to be applied.

reture

typedescription
void

code example