Godot Version
4.2.2
Question
I am using a Camera2D node and implementing a zoom function.
I also implement a min and max zoom using the Vector2.clamp method.
It does clamp as Vector2(2,2) but it does not for Vector2(0,0) or Vector2.ZERO and goes beyond the negative side which inverts the view.
Why does it not clamp on zero? Here is my code:
var cameraZoom = Input.get_axis("WHEEL_UP", "WHEEL_DOWN")
zoom += zoomSpeed * cameraZoom
zoom = zoom.clamp(Vector2(0,0), Vector2(2,2))