RigidbodySynchronizableAddTorque(Single, Single, Single, ForceMode) Method
Adds a torque to the rigidbody.
Namespace: Alteruna.MultiplayerAssembly: Alteruna (in Alteruna.dll) Version: 2.0.1+a1176e08a0b4a6bfd8fefeddde6163a16d29e5ab
public void AddTorque(
float x,
float y,
float z,
ForceMode mode = ForceMode.Force
)
Parameters
- x Single
- Size of torque along the world x-axis.
- y Single
- Size of torque along the world y-axis.
- z Single
- Size of torque along the world z-axis.
- mode ForceMode (Optional)
- The type of torque to apply.
Force can be applied only to an active rigidbody. If a GameObject is inactive, AddTorque has no effect. Wakes up the Rigidbody by default. If the torque size is zero then the Rigidbody will not be woken up.
Reference
[!:https://docs.unity3d.com/ScriptReference/Rigidbody.AddTorque.html]