Is there a way to enable resizing handles in game (not in the editor)?

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

I remember hearing that the Godot editor itself uses the Godot UI pieces to render itself. Given that, when one say creates a Godot Sprite node in the editor and clicks on it, it creates a pink outline around it w/ circle manipulators/handles one can use to resize it.

I am wanting that sort of functionality in a game (not just the editor…i know there’s a tool to do that in the editor only). Let’s pretend I am making an image program/game using gotdot and an in game mechanic wanted is to resize using a handle/manipulator like that (so when a handle is grabbed and moved a signal can be called).

I have started down the path of an Area2D and using DrawLines and DrawCircles along the rectangle collision shape to get the initial render. But then I started thinking if I was making this too hard as in the editor itself it does this - so maybe I’m missing a node or checkbox that gives me this sort of thing “for free”?

I know that this is the exact opposite of what you want, but maybe if you reverse engineer this exaple, you might be able to make what you want. This is a plugin that generates some purple handles and you use it in the editor.

Maybe you could tweak it and have it run in-game. Otherwise I think I would go for your original plan too. Still, your intuition must be correct, so I would like to find out about it as well.

johnygames | 2019-12-29 23:35