Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | PugMasterPug |
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.