Godot Version
4.3
Question
Is it possible to change node created with set_drag_preview() while dragging? Let’s say to rotate it?
Or should I implement custom preview for this?
4.3
Is it possible to change node created with set_drag_preview() while dragging? Let’s say to rotate it?
Or should I implement custom preview for this?
It should be possible if I look at the documentation:
it says
void set_drag_preview(control: Control)
So if you have a separate scene that inherits from Control and for example add a TextureRect as a child node, you can have the scene’s logic rotate the TextureRect while it is visible.
You would then need to instantiate that custom control and pass it into set_drag_preview
. The documentation recommends destroying it afterwards.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.