Animation-based facing directions hitching

Hi, so I made a custom rig player model for my game, and I tried originally using BodyGyro to set the rig’s facing direction, but that worked undesirably, so I decided to try something with animations. Basically, The player can only move in set axis directions. e.g: Right, left, up, or down. Not a mix of any two directions to move at angles. Very generic player movement.

I figured I could achieve this by using animations, and rotating the torso by 90 degrees in the animation editor for each animation to set the looking direction of the rig according to what I need.

However, only when I walk to the right, then go down, the animation transition is very ‘hitchy’ and is no longer smooth, and it kind of looks undesirable, as you can see in this clip:

Any ideas, or methods that might work better than what I’m currently using? Thanks :slight_smile:

Are there any scripts preventing the player to walk like this, or is this just like this?

1 Like

There shouldn’t be. I check to see what key the player is pressing, then play the according animation to set the rig’s looking direction.

Maybe there’s a problem with the animation, did you make the animation by yourself, or did someone else did?

I whipped them up myself. There’s only one keyframe in each animation, and looping is set to true so it doesn’t reset, and it only seems to be a problem when I’m walking to the right then go down, that’s when it doesn’t look smooth. Everything else seems to be working good. :confused:

I might’ve found a solution!

Instead of setting the Transform property of a Motor6D, I tried setting the C1, which is a specific offset. And it seems to do the trick!

Hopefully it’ll be smooth sailing from here. :slight_smile: