Portfolio 4 - Tutorial 2
Animation in Unity
For this tutorial session, I had to import my model into Unity and figure out how to set up its animations. This was relatively easy to begin with, since I simply linked the idle animation to the entry condition on the object's animator component and controlled the beckon animation with a simple script that toggled a parameter in the animator component. While the character could move through a basic movement script, this movement had to be linked up with the walking animation, and we were tasked with trying to dynamically match the speed of the character to the speed of the animation. At first, I went about this the wrong way by trying to use the biggest value between the velocities on the x (horizontal) and z (depth) axis and it somehow ended up looking like this:
Eventually, I was able to produce what you see in the first image by getting the magnitude of the velocity (determined by subtracting the position in the last frame by the position in the current frame over time), which Unity conveniently provides access to. I did have to tweak how the magnitude mapped to the animation speed, and the first thing I tried was performing a Log transformation on it to normalize it back down from overly fast speeds (I thought to do that because I'd just had another class where I did the same thing with a different type of data), but I felt this was still a little fast, so then I divided it by two, which seemed to fit.
Utas KIT207 Portfolio
Status | In development |
Category | Other |
Author | kiaric |
More posts
- Portfolio 10 - Tutorial 4Aug 17, 2022
- Portfolio 9 - Lighting and ShadersAug 16, 2022
- Portfolio 8 - Game IdeationAug 09, 2022
- Portfolio 7 - Simple GameAug 09, 2022
- Portfolio 6 - Tutorial 3Aug 06, 2022
- Portfolio 5 - Terrain and ProbuilderAug 02, 2022
- Portfolio 3 - Character Rigging and AnimationJul 26, 2022
- Portfolio 2 - Tutorial 1Jul 20, 2022
- Portfolio 1 - The Big PenguinJul 19, 2022
Leave a comment
Log in with itch.io to leave a comment.