- Edited
xyz i.e. keep it as a Vector3 component.
I have a suspicion that Vector3 is not necessary here. Vector2 has the same accuracy, doesn't it? Then we can take Vector2 and compare its components — I only need 2 values of min and max.
8 @export var high := Vector2(0.0, 1.57) # where in Vector2(x, y): x = high_min, y = high_max.
…
44 # with jamming.
45 if tilt.position.y >= high.x and tilt.position.y <= high.y:
46 tilt.position.y += event.relative.y * SENSITIVITY
47 if tilt.position.y < high.x:
48 tilt.position.y = high.x
49 if tilt.position.y >= high.y:
50 tilt.position.y = high.y
…well, it works.