ImGuizmo
ImGuizmo copied to clipboard
Crash when changing "operation" mid-mouse drag
(I'm new to ImGuizmo, so apologies if this is documented and I haven't found it yet. And thank you for this great tool.)
Suppose I'm using an ImGuizmo in TRANSLATE
operation, while I'm dragging with the mouse if I change the operation to, say, ROTATE
(e.g., with a keyboard shortcut) then Manipulate
will crash.
Currently, my unsatisfying solution is to call Enable(false);Enable(true);
if the operation changes mid-drag. This flips the "Using" bits to false which kills the current mouse interaction. 1) Is there a more graceful way to stop the current mouse interaction? I didn't see a set_using(bool)
type function exposed. 2) Is there a best practice to deal with changing the operation mid mouse drag? I suppose I could handle the logic on my side to wait until mouseup to change the operation, but maybe there's better thing to do.
Hi Alec! Internaly, I use mouse button up/down to handle various states. So, if the manipulation mode changes there is no way I can detect it. The quick to fix it IMHO is to wait for a mouse up before changing the manipulation mode on your side.