How to make eyes follow your mouse?
Posted:
Mon Jan 10, 2011 3:24 am
by ThaKid244
Hey what's up. I was wondering how to make a character's eyes follow your mouse movement without them passing through the eye lids/border, as if staying in a contained area. I have attached my attempt at this. Could anyone help me with this?
Re: How to make eyes follow your mouse?
Posted:
Mon Jan 10, 2011 4:12 am
by skydereign
I'd do it like this. Since the eyes will always be next to each other, you should make it a single animation and actor. What I did in this is find the direction from a face actor to the mouse, and use cos/sin to set the eye's xy. The eye actor is always on the circle around the face. To change the distance, change the 20 in the eye's draw script.