Sprite animations and movement in 3D space


I have a sprite in a 3D world, intended to be a car. I want it to only move forwards, left and right (Side to side) with no rotation or actual turning. Which is easy enough to do. But how do I make it so it can only move left and right while moving forwards? I don’t want it sliding on the ground, so having left and right inactive while not moving forwards would be best.

I tried getting around this by using sprint to move forwards, which worked partly. But it made going left and right too clunky. Also had the idea of strafing instead of using the normal left and right for sprites. But everything I look up strafing is for 3D things with skeletons so I can’t use the blend space. But thinking about it, that would still rely on the Axis so I suppose it would be redundant.

As for the animations, it works mostly. The car uses the left and right animation when the buttons are pressed, the forward animation when going forwards. But I want it to go back to idle when the car stops. I can make it go back to idle when forward is no longer pressed, but it will slide in idle state and I don’t want that. Want it to keep its forward animation until it fully stops. Plus it also has it that if I slide the car on the spot, it will play out the left and right animations, I also wish to prevent left and right animation and only have them play out when moving left and right while going forward.

Here’s what I have now.

Here’s what I had when I tried sprinting.

Hello! To avoid strafing or clunky turning I would try to calculate turning angle from current speed. The faster the car goes - the more it rotates. Never did something like this, but my gut feeling tells that it can cause too quick turning on really high speeds, so you can try to restruct max turning speed, but overall this should do the thing + even invert rotation when going backwards (if you use signed velocity).