How to limit player controlled camera orbit around character?

Hi, UE4 noob here!

I currently have a camera which can orbit the player character. The player can control this orbit with x axis mouse input. However this is a side-scrolling game and I wish to limit the camera movement to a 90o angle, so that the camera cannot go all the way around the player. So far I have been attempting to use a clamp but with no luck, I also considered a timeline with a spline, but I have no idea how to use them.

This allows me to orbit on the X axis 360 degrees.

Thanks in advance for any help :slight_smile:

In this case it seems like you wanted to add a little bit of rotation to the camera effect that it would orbit on a specific limit left to right on the side scrolling character. Whenever handling character rotations and the camera has a spring arm it is best to manipulate the spring arm since the camera is a child component of the arm.

Unreal Engine Version 4.10

The axis mapping input for adding the rotational value to the camera in the project settings


In the characters main blueprint

Looks like we have figured it out.

Unreal 4.8

Allowing the player to control the camera yaw to orbit the around the character at a specified angle:

Thanks very much to EvilOverseer88 for help in getting this sorted.

Nice. Thanks. It works!!! But i have another doubt, how do i bring back the spring arm to its default value?

Either in your Construction Script or at the Event Begin Play you can grab what the current value is of the spring arm is and store that as a variable on its own so that it may be referenced anywhere you may need to call on it.

Hello, I have try what you done, but my yaw have not action, my character just do nothing, are there any things I missed?