Hello there,
Relatively new to unreal engine 5. I’m trying to create a top-down style of game, and got stuck with character movement. I wanted to implement a camera turn function, which turns the camera with 90 degrees either to the left or the right. In the Level Bluprint, I created the function for this and it works fine. However, if I turn the camera by 90 degrees, the player movement gets messed up, for example the W moves to the left, and towards the top of the screen. I adressed this issue with the following by getting the camera rotation vectors and changing the world direction accordingly. Now the movement works fine, however the player not turns to the direction of movement. I press W and the pawn moves towards the top of the screen, but when the camera is turned it faces to the original top direction.
Original state faceing the right way during move:
Turned view faceing the wrong direction (right now i’m moving up with W):
What should I do to align the rotation also?
What I tried:
Disabling or Enabling controller rotation yaw (its true on default)
Disabling CRY and enabling Orient Rotation to Movement (which i think should rotate the pawn in wichever direction its accelerating (in this is if i go up it should go up?)
Use controller desired rotation.
None of them worked.
Is there a way to do this easier than I did ? If so where can I learn it ?
(My Camera actor is basically an actor bluprint with a spring arm and a camera)
Also I have a view target blend in the beginning. (not sure if related)
Thank you for your help and time.