I have a game that depends on whether the mouse is hovering over an area (Area2D ofc) that triggers something to happen. But it doesn’t automatically detect the mouse being over it, so playing it feels like shit. Basically, this area’s detection doesn’t activate until a condition is checked like, say, pressing a button. But what if that button is where the area is? What if I want the area to automatically detect the mouse without having to flick my mouse back into so it can do what I want it to do?
Sorry if this is coming off as confusing I’m bad at describing things
But yeah, I’m wondering if I can check if the mouse is over a node in something like the process function so it can check it at all times
No, not at all “ofc”. There are Area3Ds, and control nodes can also detect mouse events, which can be considered an area as well. Try to state what you are using exactly the first time, or at least use the edit feature.
Consider being open to improve your ability to describe things. What I said above isn’t meant to be discouraging / rude.
You should 100% take wchc’s solution, but if you are set against signals and them not being “automatic” enough, you can put get_global_mouse_position() into _process() and check if the mouse position is within the areas global position ± half the areas size.
And if the area is under a button you can try to set the buttons mouse filter property to pass.