I'm currently using an area2D with several CollisionShape2D nodes to indicate water puddles / streams and other passable water bodies. When my player sprite's position is within the area I want to spawn water splashes and ripples while running, which works fine. The problem happens when I exit the area. The area will be random, so I'd like to use the CollisionShape or some other flexible way to add puddles and such. The body exit signal uses the center of my player sprite it seems. When my player sprite is partly outside the area it still spawns water splashes, which are now outside the water body. Is there a way the use the bounding box of my player sprite instead so I can stop the spawning in time? Or some workaround?
My player sprite has Raycast2D nodes that cast 1 tile in 4 directions to prevent moving into tiles that are already occupied. Maybe that can be used somehow, but if I make it check areas as well, then it won't enter water bodies.