Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImGuizmo::IsOver() returns 'true' when hovering in certain locations around the gizmo #132

Open
AndreiDespinoiu opened this issue Oct 6, 2020 · 9 comments · May be fixed by #352
Open

Comments

@AndreiDespinoiu
Copy link

AndreiDespinoiu commented Oct 6, 2020

Steps to reproduce:

  1. Add this in your render loop:
std::cout << "Result is: " << std::boolalpha << ImGuizmo::IsOver() << '\n';
  1. 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.

inconsistent_hover

Additional information:
Dear ImGui 1.78
OpenGL 3.3
GLFW 3.3.2
Windows 10 (64-bit) build 1903

@AndreiDespinoiu
Copy link
Author

AndreiDespinoiu commented Oct 6, 2020

I'm also getting some weirdness with the central white dot (and near the red axis) when the gizmo isn't visible:

inconsistent_while_not_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.

@CedricGuillemet
Copy link
Owner

That's interesting. Let me check that :)

@CedricGuillemet
Copy link
Owner

@AndreiDespinoiu Do you have a call to viewManipulate ?

@AndreiDespinoiu
Copy link
Author

@CedricGuillemet No. Just the gizmo (ImGuizmo::Manipulate).

@CedricGuillemet
Copy link
Owner

@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)

@AndreiDespinoiu
Copy link
Author

AndreiDespinoiu commented Oct 8, 2020

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.

same_issue_in_the_sample

@CedricGuillemet
Copy link
Owner

CedricGuillemet commented Oct 10, 2020

I'm trying again to repro ... and I get the same as you. I'm investigating now :)

@CedricGuillemet
Copy link
Owner

I just pushed to main branch and it should be fixed. Let me know if it works for you...or not !

@AndreiDespinoiu
Copy link
Author

AndreiDespinoiu commented Oct 10, 2020

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!

@unadkat unadkat linked a pull request Dec 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants