As I can do to make a gameobject added in the inspector imitates the position of another object in the scene.
Something like this.
var Obj_A : Transform;
function Update (){
var Obj_B : GameObject = GameObject.FindGameObjectsWithTag("Enemigo");
//Obj_A.position = Obj_B.position;
}
Tanks…
hpjohn
January 11, 2013, 5:02pm
2
GameObject.FindGameObjectsWithTag("Enemigo")
Returns a LIST of objects, not just one single Obj_B
try using
var Obj_B : GameObject = GameObject.FindWithTag("Enemigo");
Is true, but as I can make it have the same position of the enemy. and note that the script is not attached to any of the two objects, They are added to a variable.
Help…