clamp 1st person camera in y axis

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By theMX89

so, im triying to clamp the camera of my first person camera in the y axis.
im using these variables for the camera max and min:

var Cameralookmin:float = -90.0
var Cameralookmax:float = 90.0

thanks for any help

:bust_in_silhouette: Reply From: cascas
$Camera.rotation_degrees.y = clamp($Camera.rotation_degrees.y, Cameralookmin, Cameralookmax)
:bust_in_silhouette: Reply From: theMX89

doesn’t work :frowning: