Need working example of eyes looking in direction of mouse position.

peter1354peter1354 Member Posts: 7
I will have multiple illustrations of animals, and want to animate their eyes.

If a user hits the screen via a touch press event, the eyes should "look" into the direction of the mouse location, and the looking direction should update until the touch is released.

The difficulty is probably the movement of the 'iris', as simply updating the rotation would not give a natural look to the eye movement. I guess it needs a x/y update, which is constraint in a circle, so when touching inside the circle, the iris will show up in the center of the eye.

Any idea what's the best way to achieve this, and how to do it on many individual eyes?

Comments

  • peter1354peter1354 Member Posts: 7
    I will have multiple illustrations of animals, and want to animate their eyes.

    If a user hits the screen via a touch press event, the eyes should "look" into the direction of the mouse location, and the looking direction should update until the touch is released.

    The difficulty is probably the movement of the 'iris', as simply updating the rotation would not give a natural look to the eye movement. I guess it needs a x/y update, which is constraint in a circle, so when touching inside the circle, the iris will show up in the center of the eye.

    Any idea what's the best way to achieve this, and how to do it on many individual eyes?

    Name your price for providing me a working example.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Merged… Look at my profile games. I have a demo you should be able to modify. It keeps an actor pointed at a specific point while its moving. You should be able to modify the rules to use mouse.x and y instead of the set point I have defined.
  • wormilwormil Member Posts: 127
    I was actually thinking of this yesterday (what the hell day is it anyways?!). I think it was yesterday...

    I'll send you a working copy of this in a bit.
  • wormilwormil Member Posts: 127
    Ok, finished, Let me know where to send this.
Sign In or Register to comment.