Stop camera from rotating more than +-90°

I have searched for this but I did only found older threads with a solution I didn’t understod.

How do I stop the camera from rotating more than ±90° in the Y axle. (ie. so I can’t look backwords by turning “over” or “under” the character)

I found one way that seamd reasonly possible, extending FlyByCamera witch I have done, but I don’t know how to make SimpleApplication use my class instead of FlyByCamera.

Remove the existing FlyCamAppState and just use your own camera… or make your own version of FlyCamAppState and attach that instead of the regular one.

The chaseCam has setMinVerticalRotation and setMaxVerticalRotation methods that do what you’re asking.

@pspeed so it were that simple. Thank you! It’s working great.

@thetoucher I don’t use the chaseCam and I do like the current solution. But thanks anyway :slight_smile: