hi guys! sorry for the fancy subject, but i can’t explain in a better way… ![]()
i have a game object (prefab) with a mesh and a script attached on it. the script simply aim the mesh to the player, ok?
so, when the game start, I instance some game object, but only the first game object’s mesh is aimed and the other no.
This is the script:
private var myGO: GameObject;
function Start()
{
myGO = this.gameObject.Find("mesh"); // get mesh object at startup
}
function Update ()
{
myGO.transform.LookAt(player.transform.position); // aim the mesh
}
Someone can help me? ![]()
Thanks a lot and good work to everyone!