Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

var angle: float;
float angle;
angle as float

Description

The current angle in degrees of the joint relative to its rest position. (Read Only)

The rest angle between the bodies is always zero at the beginning of the simulation.

	print(hingeJoint.angle);
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Example() {
        print(hingeJoint.angle);
    }
}
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	def Example() as void:
		print(hingeJoint.angle)