<img src="http://img399.imageshack.us/img399/9625/screenshotpn5.png">
Techniqually this was a one event example until I decided I wanted to rave it up a bit by putting a gradient over the top which changes colour...
How it works: The eye is positioned at the mouse, then I work out the distance and angle between the mouse and the middle of the eye socket. I then divide the distance, and cap it to 32 pixels. Then I position the eye to the centre of the socket, and then move it by the distance and angle. Finally to add a bit of realism, I scale the eye down slightly by subtracting the distance from it, so it will become smaller as it leaves the centre (as eyes are spherical).
And thats about it I figured this might be useful if someone wanted to make eyes in a game which looked at things (for example, eyes on a portrait that look at the player...perhaps even the players eyes which look at the mouse in a mouse aim game...)
I'm wondering if this could be useful as a behaviour...just two actions 'set socket position' and 'look at'...then some tweaking variables that affect it. The intial position of it in the layout could be the default 'socket position' and then if you wanted to make eyes on a portrait that looked at the player you would just use a single action : 'look at player' So what are your thoughts?