I am having some issues with my current Camera (First Person Camera). I want to restrict the Rotation (Pitch) of the Camera so you can’t see completely straight to the ground, but be able to see completely straight in the air.
The stuff I have tried so far didn’t work out the way I wanted. I tried applying a new “Add Controller Pitch Input” Value when the Camera Pitch is between 90-300. (90 being looking up, doesn’t really go beyong that which is good, and 300 the value I want the camera to stop when looking down)
The Result was basicly that when I looked down and “Forced” my way to look higher than 300 it would “fight” back and in a result look pretty ugly. (I hope you understood what I mean)
Basicly I want just to have a simple Value where I can say You can’t look any further.
Doesn’t anyone know how to do something like that?
Thanks for the Screen. I tried to somewhat recreate it but at least the way I did it didn’t work.
Everything works normaly until you get to the -60 points which is in this case looking down to the point I want it to stop. When that Point is hit is switches to the lower lane which clamps the value and Sets the World rotation to the Clamped Value. But after that as you slightly can see it always uses the lower path even if the pitch value I am following is -60 which should result into going to the “Add Controller Pitch Input” which it doesn’t. Even When I set the Clamp at -58 or something but keep the -60 in the compare it still won’t switch up again.
And It SHOULD work like this but it doesn’t. I can look left and right but I can’t look up and down. It is stuck at the 0 start position.
When I mode my mouse up and Down I can see via the Clamped float I am printing and the values I am watching, that It works. It goes up to 90 and down to -60 but it nearly instantly goes back to 0. Its at 90 and goes in like 4 frames back to 0 but I get no visual feedback in anything actually happening, its just like looking up and down is disabled although I can see that values are changing.
I treid doing it your way HaxO, but unfortunatly I didn’t get the right results. I could rotate my camera really strange and look Backwards somehow with enough jiggling around
Then I tried that was HEGI said but I couldn’t really find the Camer Manager Component, since I didn’t had a Custom player controller. So I had to create a new Custom Player controller and then create a new custom Camera Manager where I then could find under “Player Camera Manager” the Options for View Pitch Min / Max.
Then connect everything to eachother and in the World Settings, and setting MyCharacter rotation back to the standard “Add Controller Pitch Input” and everything works perfectly without a lot of nodes
Hi Haxo,
Excuse me but can you explain how do you set the node : Target/Relative rotation, from the “First Person Camera” variable to “Break Rot”?
Many thanks,
Drag your camera into the blueprint graph, drag the output node into space and type ‘rotation’ then select ‘Get Relative Rotation’. Then just drag off the relative rotation and select break rotation from the context sensitive menu.
Make a variable to reference the location, and instead of using ‘AddRelativeLocation’, add whatever you were adding in the ‘AddRelativeLocation’ to the variable you made, and clamp it while setting the variable, and then set the world location of whatever it is you were moving.
sorry to bump, but I thought I’d chime in with my solution to the problem – I was working off of HaxO’s example and the rolling ball example map. If anyone wanted to figure out how to incorporate yaw, here you go
I used @HaxO way of doing it and worked perfectly. I just used a different way to invert the pitch back. With the Invert rotator, I used it because I wanted to limit the angle for prone only.