- Home /
Problem with teleport
hello I have the following script
var anotherObject : GameObject; var Target : Transform;
function Update () { if(Input.GetKeyDown("r")) {
transform.position = anotherObject.transform.position;
} }
The situation is this: I have an object, dropped it, and pressing R teleport the player to the object.
The problem is: teleports the player to position 0,0,0, not to object.
Sorry for my english please, and thanks.
Comment