Download

Limit camera rotation on True First Person

Hi everyone, I’m trying to implement in my game a True First Person character (a first person with a body on show).
I have started with a ThirdPerson standard BP and I have put my Camera as a child of my Mannequin Skeletal Mesh. The Camera is attached to a parent socket I made from the head bone of the Mannequin.

To be able to rotate the camera in game with my mouse I activated the “Use Pawn Control Rotation” on my Camera. This work but my camera is able to rotate 360° and I’d like to limit its roation so the camera never pass the character shoulders.

I manage to do it by setting the View Yawn Min and Max from the Player Camera Manager; it works but in play I found that the limits work only from the initial rotation of the camera and I’m not able to ever face the opposite direction.

I’d love to limit the camera rotation based on the Skeletal Mesh direction: my camera should be able to rotate from -90° to +90° from the forward vector of my Skeletal Mesh direction.

Here are some screenshots of my project, I hope that someone will help me sort this out!

You’re very close, the camera manager needs updating as the mesh rotates:

This would give you a 180 degrees viewing angle.

1 Like

Thank you! You saved me!

Ok so basically everytime I move the camera it receive new “boundaries” based on the rotation of the character! Good to know, I came from Houdini and I was a little bit confused by the rotation here called Roll Pitch and Yaw :stuck_out_tongue:

Thank you so much!

1 Like