Hello! So I’m making a 2.5d game, where camera stays in one spot, and player can move around.
I’m having a problem where if I face the camera one direction, everything works fine. but when I (for example) turn it facing some other way, movement stays the same as before (So what should be S for down, can be W for down)
I’m starting with the basic third person preset
I’d like for player movement be based on the camera (So down is always S, and when coming downwards you come towards camera)
The third person template drives movement from Control Rotation, not from the camera you rotated in the level. Control Rotation only changes when the player controller looks around (mouse look, or Add Controller Yaw Input). Rotating a Camera component or a Camera Actor leaves that yaw where it was, so W/S keep pointing the same way in the world.
For a fixed 2.5D camera, build the axes from that camera and flatten them onto the ground:
Use the camera you actually render. If it is a Camera Actor sitting in the level, call Set View Target With Blend to it on BeginPlay and keep a reference. On a spring arm, turn off Use Pawn Control Rotation, or the arm will fight you and snap back.
In the Move input (the Enhanced Input action from the third person preset):
Get the camera world rotation, Break Rotator, then Make Rotator with Pitch 0, Roll 0, and Yaw = the camera yaw.
Get Forward Vector and Get Right Vector from that rotator.
Multiply Forward by the Y axis (W/S) and Right by the X axis (A/D), add the two vectors, and pass the result to Add Movement Input.
Do not use Get Actor Forward Vector here. That stays glued to the mesh, which is why turning the camera does nothing.
Character movement: Use Controller Rotation Yaw = false, Orient Rotation to Movement = true, if the mesh should face the direction it walks. If it should always face the camera, leave Orient Rotation to Movement off and set the actor yaw to camera yaw + 180.
If you would rather not replace the template graph (it already does control rotation, yaw only, forward/right), then whenever the fixed camera changes, call Set Control Rotation with that same flattened rotator. The existing Move events will follow it.