Need working example of eyes looking in direction of mouse position.
peter1354
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?
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
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.
I'll send you a working copy of this in a bit.