Thursday, February 25, 2021

Unity Tutorial 4: Animation and projectiles

Screenshot of my Unity workspace

In this week's tutorial we began adding character animation which was something that we briefly encountered in the previous Unity 3D tutorials however its 2D counterpart requires quite a bit more effort as instead of manipulating a model for animation, each frame is a different sprite to load. This tutorial introduced the Unity animation windows for 2D animation which were all quite intuitive once you got used to the interface. The animation controller and blend tree introduced in this tutorial looked fairly similar to the ones used in the 3D tutorials. We also added the code for the in-game sprites to trigger the appropriate animations. This week's tutorial also had us implement a projectile for Ruby to shoot. This feature expanded slightly on the Unity physics system which is still quite a confusing aspect for me in terms of the 2D game environment. This tutorial reintroduced the instantiate function for spawning objects in the world. It also introduced layers to the 2D space and introduced the concept of certain layers, and thus game objects, not interacting with other certain layers. We also gave the projectile the in-game function of pacifying the robot when hit. I have encountered a strange error with the robots collider which I have not been able to mitigate yet but plan to try and fix soon.

No comments:

Post a Comment

Reading Task 10: Finishing touches

  Image by Markus Winkler on Unsplash.com For this week's reading task we, as a class, collectively worked on our individual sections in...