Rotate a camera with the player's direction.

Hi! I’m new to UE4 and at the moment I’m trying to make a 2,5D sidescroller. I’ve been trying to make my camera rotate with the direction the player is moving in, always making the camera follow the player at a certain angle on the Z-axis.

Right now the camera does rotate, but it infinitely rotates. I would like to set the Z-axis angle to a maximum of 25.

Also, I would like to increase the angle based on the velocity in a certain direction. For example:

  • maximum speed to the right = 25 degrees
  • half the maximum speed to the right = 10 degrees
  • standing still = 0 degrees

My nodes look like this

I’ve been struggling with the problem for a while now. Any help would be appreciated!

Hmm, I’m not so good with cameras either, but I would use “AddLocalRotation”, maybe “SetRelativeRotation”, this will give you a terrible hard camera movement, so you have to add a timeline between your nodes.

Maybe this works, maybe it doesn’t