Adds a torque to the rigidbody relative to the rigidbodie's own coordinate system.
torque
axis.// Spins the rigidbody around its own y-axis function FixedUpdate () { rigidbody.AddRelativeTorque (Vector3.up * 10); }
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void FixedUpdate() { rigidbody.AddRelativeTorque(Vector3.up * 10); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def FixedUpdate() as void: rigidbody.AddRelativeTorque((Vector3.up * 10))
Adds a torque to the rigidbody relative to the rigidbodie's own coordinate system.
torque
axis.// Spins the rigidbody around its own y-axis function FixedUpdate () { rigidbody.AddRelativeTorque (0, 10, 0); }
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void FixedUpdate() { rigidbody.AddRelativeTorque(0, 10, 0); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def FixedUpdate() as void: rigidbody.AddRelativeTorque(0, 10, 0)