ImGuizmo
ImGuizmo copied to clipboard
ImGuizmo::IsOver() returns 'true' when hovering in certain locations around the gizmo
Steps to reproduce:
- Add this in your render loop:
std::cout << "Result is: " << std::boolalpha << ImGuizmo::IsOver() << '\n';
- While the gizmo is visible, hover the mouse cursor around it, avoiding the actual elements that comprise the gizmo.
The following occurs:
The IsOver()
function returns true
, regardless if the mode is set to world space or local space, and regardless if the transform operation is set to translation or scaling.
Note: Also occurs while in rotation mode, on the inside of the gizmo, as if it's hitting the backside of the control circles.
Expected result:
It should return true
only if actual elements from the gizmo are hovered.
Additional information: Dear ImGui 1.78 OpenGL 3.3 GLFW 3.3.2 Windows 10 (64-bit) build 1903
I'm also getting some weirdness with the central white dot (and near the red axis) when the gizmo isn't visible:
This shouldn't return true if the gizmo isn't drawn.
if (isGuiGizmoVisible)
{
ImGuizmo::Manipulate(...);
}
Here isGuiGizmoVisible
is a boolean that I'm toggling on and off.
Maybe it's a different bug? Eh... I'm mentioning it here as a comment because they seem related.
That's interesting. Let me check that :)
@AndreiDespinoiu Do you have a call to viewManipulate ?
@CedricGuillemet No. Just the gizmo (ImGuizmo::Manipulate
).
@AndreiDespinoiu Can you please try to replicate the issue in the sample? You'll need to comment the line to viewManipulate because this call interfers with view/projection matrix (I'll fix that soon)
Yes, it happens in the sample as well.
Add this line:
std::cout << "Result is: " << std::boolalpha << ImGuizmo::IsOver() << '\n';
before creating the sequencer, so that means at line 565 from main()
here: https://github.com/CedricGuillemet/ImGuizmo/blob/master/example/main.cpp#L565
Obviously, you need this header at the top:
#include <iostream>
It doesn't matter if you comment out the ImGuizmo::ViewManipulate
line or not.
I'm trying again to repro ... and I get the same as you. I'm investigating now :)
I just pushed to main branch and it should be fixed. Let me know if it works for you...or not !
All right! This is awesome. It's fixed. Thank you so much!
Now about the white dot in the middle that I showed in the second gif... I submitted it as a separate issue, which I hope you'll take a look at: #133. Thank you!