- Home /
Question by
MTDues · Jan 14, 2018 at 09:09 AM ·
c#javascriptscripting problemscripting beginner
Proplem with position reset script of certain object
hello
i want to achive a script when i press V the object no matter how far it went it gets back to the original position point near my player
var startPosition : Vector3;
function Awake () {
startPosition == this.transform.position;
}
function Update () {
if (Input.GetButton ("V"))
transform.position = startPosition;
}
Comment