+4 votes

I am making a First Person game, and I want to make it so that I can detect when the player's mouse is over an object, I have a piece of code that looks like this:

func _ready():
    Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

The object I want to register mouse input has an Area node, and I use the mouse_entered() signal to register when the mouse is over, but it doesn't work.

I also tried taking the Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) out of the code, and then it worked correctly.

in Engine by (129 points)

1 Answer

0 votes

This is a known issue and you can track it here. So far, we can set up a ray cast manually for that.

by (14 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.