|
Hello I am having trouble with my lookAt script I made heres the one that would work
but the object is going to spawn when my enemy dies so the target wont be set when it spawns here is what I tried for an example of what I am trying to do
can someone please help Thanks.
(comments are locked)
|
|
This one should work:
From the docs: Thanks so much for replying so quick its just what i wanted
Apr 19 '11 at 08:35 AM
Aydan
(comments are locked)
|
|
// This is another way of doing this, example from a game I've started working on // //pre defined target transform.LookAt(target); if(transform.position.x <= 30){ target = gameObject.Find("camera_look_2").transform; } else { target = gameObject.Find("camera_look_1").transform; }
(comments are locked)
|
