|
hello i have an enemy that looks at me and chases me and stuff but it rotates on all the axis to look at me so how do i make it rotate on only the Y axis to look at me? Heres what i've got at the moment.
Thanks.
(comments are locked)
|
|
create the rotation vector like this.
then pass this to Slerp. how would i put this into the script?
Apr 27 '11 at 03:11 AM
Aydan
instead of target.position - transform.position put rotationVector in your LookAt function. that subtraction creates a vector from you toward the target but you should change the y as you see.
Apr 27 '11 at 06:59 AM
Ashkan_gc
(comments are locked)
|
