The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

I have a 3d mesh and I want to detect mouse overs. So I added an Area with a collision shape and a mouse_entered() signal. "Input Ray Pickable" is true.

But none of my collision methods are firing.

func _on_ManufactoryArea_mouse_entered():
    print("mouse entered")

func _on_ManufactoryArea_mouse_exited():
    print("mouse exited")

func _on_ManufactoryArea_input_event(camera, event, click_position, click_normal, shape_idx):
    print("input event", camera, event, click_position, click_normal, shape_idx)

I don't have to raycast the mouse location do I? I assumed Godot would handle that given the mouse_entered signal is inbuilt.

Godot version 3.2.2
in Engine by (2,159 points)
edited by

2 Answers

0 votes

does the 3Darea have a collision shape?

by (1,514 points)

Yeah, of course. Ok, I just replicated this in a test project and it picked up the signal which it's not in my actual game...

Um. The game uses numerous viewports for minicameras but not when the game starts though. Otherwise the Area node in buried quite deep in an obj. I'll try adding a test obj into the game. Other than that I'm at a loss.

not really an answer, but start from the test project and keep adding your game features, you'll find a which one is causing the issue eventually

Appreciated. I restarted the editor and now it works. Nobody suggested "turning it off and on again" ;)

+2 votes

I had the same problem, in my case it was due to a Control node in the scene.

I had a Control node with Label subnodes in the scene to work as a HUD. As soon as I removed it or just made it invisible, the Area input_ + mouse_ signals were working. When I made it visible, they didn't work anymore.

The Control node blocked the mouse from the objects behind it. I had to set Mouse --> Filter to "Ignore" for the Control node, after that everything worked fine.

by (18 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.