Week 3 - animations in unity
Firstly, I imported the character I created in the self-study. I initially imported the .blend file into unity, which didn't carry over the animations with the model. I then tried importing the project as a .fbx file, which did import the animations.
I followed the instructions in the tutorial to get the following movement:
Once again following the instructions on the tutorial page, I created the door that opens when the player collides with the trigger detection box.
I then began working on the adding the walking animation to the scene. I created the transitions to the different animations. I used the animator.SetBool() function to change the animation, which was triggered when the input was pressed. The code for this is as follows:
var movement = Input.GetAxis("Vertical");
if (movement >= 1)
{
animator.SetBool("Walking", true);
animator.speed = 1.5f;
}
else
{
animator.SetBool("Walking", false);
}
This is what the final product looks like:
UTAS KIT207 Portfolio
More posts
- Week 5 - Game IdeasApr 05, 2024
- Week 5 - Simple GameApr 05, 2024
- Week 4 - NavigationApr 04, 2024
- Week 4 - TerrainMar 22, 2024
- Week 3 - animationsMar 17, 2024
- Week 2 - simple sceneMar 14, 2024
- Week 1 - Barrel and BridgeMar 10, 2024
Leave a comment
Log in with itch.io to leave a comment.