ConstantForce.torque Manual     Reference     Scripting  
Scripting > Runtime Classes > ConstantForce
ConstantForce.torque

var torque : Vector3

Description

The torque applied to the rigidbody every frame.

JavaScripts
// Rotates the object around the world y-axis
constantForce.torque = Vector3.up * 2;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
constantForce.torque = Vector3.up * 2;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
constantForce.torque = (Vector3.up * 2)