Homework

Move the portait~!

week2 portrait move

Eyes

First, I tried moving the eyes, When the mouse is pointed to different places, the eyes will follow the movement.

However, what I originally intended was for the eyes to move 10 units to the left and automatically stop when the mouse is placed on the left side, but I wasn't able to achieve that.

Screenshot 2024-09-18 at 7.16.41 PM.png

Screenshot 2024-09-18 at 7.17.01 PM.png

Eyebrows

Next, I tried changing the angle and position of the eyebrows. I originally thought I could make the changes directly below the 'translate' function, but I kept failing, and then I realized that the ‘translate’ part also needs to be included within the ‘if’ statement.“

Screenshot 2024-09-18 at 1.09.18 AM.png

(fail)

Screenshot 2024-09-18 at 7.18.42 PM.png

(success)

Screenshot 2024-09-18 at 7.18.56 PM.png

Mouth

Next, I hope to change the size of the mouth by clicking the mouse. When I hold down the mouse, the mouth will gradually enlarge and stop when it reaches a certain size.

Screenshot 2024-09-18 at 8.01.52 PM.png