Godot Version
v4.3
Question
I am learning game development, and to do that I’m remaking FNAF 1. In the main menu, I have an Area2d and a CollisionShape2d and it detects mouse entering and leaving in a script of a node2d. That works, but when I try to do the same thing in a different scene, it doesn’t do anything. Doesn’t print anything even though it should and just doesn’t do anything. I DO have a ColorRect, but the Mouse Filter is set to Ignore. Everything is in a normal Node which is the root node, and its the same on the main menu node, but there it works.
Some things to check for:
- Is the input event intercepted by the main menu?
- Are the entered/exited signals connected to the correct function in the correct node?
- Is physics picking in the project settings or in the viewport enabled?
- Are there any other Control nodes besides the ColorRect around, that intercept mouse input events?
- Is the CollisionShape2d inside of a SubViewport? Make sure, that the input events reach the SubViewport
- Is the size and position of the CollisionShape2d correct?
- Is the mouse mode captured?
Without more infos, it is difficult to give you more concrete advice.