This project mainly added animations to my pre-existing Pet Creator used in projects 1 and 2. Now, the pets you create can move! You still interact with the project largely the same, by pressing buttons, toggling buttons, or moving sliders. 

  1. My Complex Pet Prefab now has 2 different animations attached to 3 different nodes:
    1. A Blink Animation attached to both the Left and Right eye
    2. A “Nose Twitch: Animation attached to the nose

These are looped through by the main function, which calls a for loop to iterate through children 3-5 (which includes both eyes and the nose of the Pet).

  1. Both of the previous unique animations have a separate Toggle Button:
    1. Input: Toggling the “Blink?” or the “Nose Twitch?” Button On/Off
    2. Process: Changing the animation state variable to either true or false, depending on whether the toggle was turned on/off
    3. Output: The animation for the corresponding toggle is enabled/disabled, depending on whether the toggle was turned on/off.
  2. There is also a Slider to change the speed of the animations:
    1. Input: Sliding the Animation Slider (underneath the Toggle Buttons) left/right
    2. Process: Changing the speed variable in the Animator Component for all 3 Animations (both eyes and the nose)
    3. Output: The animation either looks slower or faster (with a minimum speed of 0.5x and a max of 2.0x

The unique aspect of this feature is the fact that the animation speed is unique for every pet you create; Meaning, different pets can have different speeds, instead of every object in the entire project moving at the same speed like in the in-class demonstrations.

  1. If you press ‘P’ at any time, the animations on the Pet you are currently editing will Pause or Unpause
    1. Input: Pressing the ‘P’ key
    2. Process: Setting the animations speed to 0 if animations are currently running, or setting the speed to the Animation Slider’s current value if animations are not currently running
    3. Output: You either see all current animations stop immediately, or resume immediately.
Published 18 days ago
StatusReleased
PlatformsHTML5
Authoralligator-forest
Made withUnity

Leave a comment

Log in with itch.io to leave a comment.