HingeJoint.useMotor Manual     Reference     Scripting  
Scripting > Runtime Classes > HingeJoint
HingeJoint.useMotor

var useMotor : bool

Description

Enables the joint's motor.

JavaScripts
hingeJoint.useMotor = true;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
hingeJoint.useMotor = true;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
hingeJoint.useMotor = true