Manual     Reference     Scripting  
  
Scripting > Runtime Classes > JointMotor   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Attributes
  • Enumerations
  • History
  • Index
  • JointMotor
  • All Members
  • Variables
  • force
  • freeSpin
  • targetVelocity

JointMotor.freeSpin  

var freeSpin : boolean

Description

If freeSpin is enabled the motor will only accelerate but never slow down.

JavaScript
hingeJoint.motor.freeSpin = false;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Example() {
hingeJoint.motor.freeSpin = false;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Example():
hingeJoint.motor.freeSpin = false