Unity — 2d platformer sprite animation in different position
I'm trying to make a simple 2D platformer game. So I got the walking and idle animations working for my sprite, but for some reason when it transitions to the run animation, the sprite is a little off the ground? Does anyone know how I could fix this?
The sprite looks like this in the two animations:
There's a number of things this could be. Here's some things to consider.
- Ensure that the location of the sprite hasn't changed. Do this by looking in the inspector.
- Look at the anchor point for each sprite, and make sure they are at the same point.
- Check for size differences.
- Make sure the sprite is cropped correctly
- Look at the animation state diagram to see if an unusual state change occurred.
I'm sure I could find more possible causes, but the bottom line is, take a look at everything you can think of that might be causing the issue. If you've tried that, then look around and see what else you can see. Finally, if that doesn't work, try asking here with everything you've tried included.