Tutorial 2 - KIT207


this week we learned

  • Importing Blender animations into Unity
  • Triggering animations in Unity using the Animation Controller, and from scripts
  • Using the Character Controller (via script)
  • Using Unity Events


firstly i went through the steps of importing the model in this case a model i found on poly pizza as i had some issues with my own  after importing a made the walking animation a loop and added the animator controller and added the idle, walk and wave animations  then added the transitions between entry and idle also another conditional transition between idle and wave and one back to idle. that utilizes a trigger called wave.

i then created a script to detect the space key being pressed then trigger the wave animation.



I then worked on the third-person player controller, added wave animation functionality, and movement along with walking animation triggered by movement speed variable. I also included a third-person camera using Cinemachine.



once i had the player moving like a racecar, i then moved onto creating the door (a white monolith) then a empty gameobject with a box collider set to be a trigger. and gave the player the correct tag.


The script for the door was simple and used the "on player enter" to activate the door. Following the same logic, I included an "on player exit" trigger that causes the door to reappear 2 seconds after the player exits the trigger area.


character model used: https://poly.pizza/m/QBEOV9ZUT8

Files

TUT2.zip Play in browser
47 days ago

Leave a comment

Log in with itch.io to leave a comment.