Different walking speed - worked fine, 'till I look up...

Hello! :smiley:
I’ve created this “different walking speed” system. :stuck_out_tongue_winking_eye: Basically, I wanted to have different speed when I’m moving forward, strafing, crouching etc. Everything finally worked fine, but then I saw when I look straigh up or down my movement speed slows down almost to zero.

I.
b4f6cd82c11e51a049a4ae6c2e7187067fe2e3c8.jpeg

II.

III.

Got two questions:

  1. Why is that?

  2. This is very NOT polished way to do what I want. Am I going in “right direction” or is there more simplified way to do that? :smiley:

Here is the answer:

Basically, when you look up or down, your character is actually trying to move up in the air or through the ground which it can’t do so it just comes to a stop.
You need to take the pitch and roll out of the equation.

That worked well! Thank You very much! :smiley: