Camera clamp causes character to roll

So trying to clamp the pitch rotation of the players camera, and it works but theres a problem, if i move the camera up or down and i keep trying to move it past the clamped value, the player suddenly gets moved on the roll axis and the camera clamp stops working


camera normally (cube is for reference)

image
camera after breaking - clamp no longer works and i can move the camera 360 degrees

You’re stressing the component out by making it perform mental gymnastics in local and world space simultaneously. :innocent:


Is this what you’re after:

The engine provides a default manager :point_up_2: (which is often enough), it hooks up to the Player Controller and meshes with Control Rotation , but you can also extend your own:

It comes equipped with some unique functionality in case you want total control over camera behaviour.


And if you want to control the camera’s orientation manually at all times, I’d start looking into Gimbal Lock.

Thanks this solved the problem! :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.