shapeshiftingrabbits / mvp-top-down-shooter

Top-down shooter MVP
0 stars 0 forks source link

Improve keyboard controls #33

Closed rafaelgonzalez closed 7 years ago

rafaelgonzalez commented 7 years ago

Solves #34 .

Keyboard input will still return X = 1 and Y =1, which will translate to a movement input vector of a magnitude of around 1.4

The solution is to divide the movement input by its own magnitude (if the magnitude si over 1), so it can not ever go over 1.