- Home /
Problem with Mouselook and arrow keys,First Person Mouselook changes my arrow keys
hello guys. I've been making a first person game in unity. I am moving him with the arrow keys. Adding a Simple Mouse Rotator, when I play the game and I look around with my mouse, the arrow keys change direction: p.e. when I look on the left the left arrow key moves forward (when it should move to the left) e.t.c. how can I fix this so my arrow keys are locked and whenever I move my arrow keys move me to the direction I point towards? Thanksss
Answer by tormentoarmagedoom · Sep 15, 2018 at 06:01 PM
Good day.
This is because you are using global axis to move, and local axis for rotation.
There are so many ways to move a object. Using global coords/axis, using the object relative coords/axis, same for rotations, using forces and masses... so many!
You need to find whichone fits better in your project
You should take a look at:
https://docs.unity3d.com/ScriptReference/Transform-position.html https://docs.unity3d.com/ScriptReference/Transform.Translate.html https://docs.unity3d.com/ScriptReference/Rigidbody-velocity.html https://docs.unity3d.com/ScriptReference/Rigidbody.AddForce.html
Good luck!
Bye!
Your answer
![](https://koobas.hobune.stream/wayback/20220612174653im_/https://answers.unity.com/themes/thub/images/avi.jpg)