Bind velocity values and directional values to separate input keys

(( Basic summary of what I want to achieve:: Example with WASD controls. Pressing W causes the creature to gain velocity. A and D adjusts the direction of the creature. Pressing D causes the creature to gain negative velocity, e.g. walks backwards. OR makes the creature come to a halt, e.g brings down velocity to a minimum of 0 ))


Hello! Building a setup for 3rd person character movement with help of the neat tutorial. However, the setup in the tutorial allows the player to turn, or flip, 180 degrees when pressing the opposite movement key. I want to prevent that.

I have a quadrupedal character, and turning 180 degrees in place is very unnatural for a creature with such a long body. So at maximum I would like to allow 90 degree turns. I’ve been trying to find a solution to this but I am very new to any kind of coding or game implementation so I am having a hard time to figure it out. Many people have solved this kind of issue with having the camera control the direction of the character at all times. I’d like that too, but to a limit. When the character isn’t moving I want it to keep still and not turn to face where the camera is looking. I would also like to be able to rotate the camera slightly while running to be able to look at the creature sideways while it is moving.

What I want to achieve is very similar to how controls and camera works for mounts in certain games. A very good example is the MMORPG WildStar. But many games featuring creature mounts seems to work like this. Example with WASD controls. Pressing W causes the creature to gain velocity. A and D adjusts the direction of the creature. Pressing D causes the creature to gain negative velocity, e.g. walks backwards (Does not make a complete turn).

What I am asking is how do I set up this kind of control? The tutorial features that all the WASD keys gives velocity gain and direction.