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 (202 points)
edited by

1 Answer

0 votes

does the 3Darea have a collision shape?

by (1,213 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" ;)

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 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 webmaster@godotengine.org with your username.