RigidbodySynchronizableAddTorque(Single, Single, Single, ForceMode) Method

Adds a torque to the rigidbody.

Definition

Namespace: Alteruna.Multiplayer
Assembly: Alteruna (in Alteruna.dll) Version: 2.0.2+dcdb8fba58ad1eb99205b1dc6265fd5b3b7cf8ec
C#
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.

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]