Posted March 24, 2024 by Clearspec11
this week we learned
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