Is there a way to set the min position and max position of the control node?

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

Is there a way to set the min position and max position of the control node?

I have a “Control” node. And I want to keep it between the “0, 0” and “750, 250” positions. So I can drag this node and I want not to move it out of these positions. So I don’t want to let him go out of those positions.

:bust_in_silhouette: Reply From: Gangster53 YT

Ok, I solved the problem. I did it by typing “rect_position” as “clamp()”.
rect_position.x = clamp(get_global_mouse_position.x, 0, 750) and rect_position.y = clamp(get_global_mouse_position.y, 0, 250)