Hello, I’m very new to unreal blueprint scripting and can’t find a solution online after endless searching.
My problem is as follows:
When I rotate the camera using my Right mouse button, my WASD keys get mixed up, for example normally your W key, forward key, always goes to the top of your screen, but when I rotate my camera it doesn’t do that anymore, same for left, right, back keys.
So basically when I rotate my camera my forward key should always go to the top of the screen, my left key to the left side of the screen, etc.
Would appreciate the help!
Here are some screenshots of mouse rotation, moving and my axis mapping.
If i understand correctly, you want to go to the “up” of where your camera is looking, not your worlds up. When you add movement input of 1,0,0 , you always move forward the absolute “up” in your case.
Instead connect this to the movement input, but this will result with your speed changing if your camera ever looks up or down. (As in if you ever want to raise cameras front up or down)
If that is the case, you can use this one.It projects your camera’s up to the ground plane (normal of 0,0,1 means it is looking directly up)
With this new projection, we can divide it to its length to get a vector with 1 length, no matter what the projection was.
Hope you find this helpful!