MOUSE_MODE_CAPTURED skips mouse_exited()

Godot Version

4.3

Question

In my project the player will end up changing mouse modes quite frequently to access panels and buttons, and I ran into a solvable issue. There are Area3D Nodes in the levels and the player needs to move the cursor to these areas to call their mouse_entered() methods. When that happens interactables will gain an outline and wait for further inputs.

This works flawlessly as long as the player does not decide to change mouse mode to captured while entered. The Area3D will never call the mouse_exited() method in this case and the interactable will remain with an active outline and await further inputs.

I have a bunch of solutions (the obvious one being a Raycast3D) for this issue but I would like to know if there is a way to call mouse_exited() when mouse_mode changed.

This is also my first post. I made a video showcasing this but I cannot upload this as a newbie. For that check out my Reddit post (same name)

This behavior is tracked here: 3D CollisionObject signals do not trigger when mouse is in "captured" mode · Issue #29727 · godotengine/godot · GitHub

1 Like

You’re my star!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.