How to lock camera y-axis so it only moves forward?

I assume you’re using the camera inside of your CharacterBP. By default this will lock to the player.

You may want to consider building a separate Camera BP, or use an exterior camera system to follow the player.

Another potential solution working inside the CharacterBP, is to create 2 more camera’s.

  1. to the player’s Left
  2. to the player’s Right

Then set up some logic to behave such as this…

  • if player is in right lane, switch to camera 1 - (left of player) - to keep a central view

  • if player is in left lane, switch to camera 2 - (right of player) - to keep a central view

Hope this helps !