How to limit the angles the player's camera can look up and down?

Hello! I’m working on this “engine” that is similar to something like Source. I’m asking how I can semi-limit the angle the player looks up and down? It’s mostly because I don’t want the player looking straight down at their body at a 90 degree angle nor want their head to snap off their neck when looking straight up at 90 degrees. Any help is appreciated!

This could be some use not really sure tho

you could check the camera orientation with toeuleranglesxyz inside of a renderstepped function with an if statement to check if the camera orientation is grater than some amout

1 Like