GPP Dev Diary 1

Avatar

For my avatar I decided to use a rigidbody and an animator to drive the avatars movement and collisions. I set up the animator using the provided animations and models. Once I had all the states and variables configured on the animator I started writing the script to drive the animator. The script uses camera transformation and some simple trigonometry to transform 2D input from the user into how much should the avatar turn and how fast should he be moving forward. To make this system more portable and reusable I split the movement logic form input pulling logic. The input script drives the movement script, this in turn allows the movement logic to be reused for example by an AI.

Comments

Popular Posts