RigidbodySynchronizableAddTorque(Single, Single, Single, ForceMode) Method

Adds a torque to the rigidbody.

Definition

Namespace: Alteruna
Assembly: Alteruna.Trinity (in Alteruna.Trinity.dll) Version: 1.3.4
C#
public void AddTorque(
	float x,
	float y,
	float z,
	ForceMode mode = 0
)

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.

Example

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.

See Also

Reference

[!:https://docs.unity3d.com/ScriptReference/Rigidbody.AddTorque.html]