Joint.anchor Manual     Reference     Scripting  
Scripting > Runtime Classes > Joint
Joint.anchor

var anchor : Vector3

Description

The Position of the anchor around which the joints motion is constrained.

The Position is defined in local space.

JavaScript
hingeJoint.anchor = Vector3 (2, 0, 0);

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Example() {
hingeJoint.anchor = new Vector3(2, 0, 0);
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Example():
hingeJoint.anchor = Vector3(2, 0, 0)