I have been working on a game that is essentially a 2 dimensional top-down shooter. I want the player to be able to walk on the ground but not off it.
My current setup consists of an Area2D which is the player, and a bunch of "tile" nodes which are instances of a prefab which is just an Area2D. The player is supposed to be able to walk only on these tiles, and not off them. I like having these tiles because I have an idea about how to generate a random maze with them later in development.
How can I make it so that the player cannot step off the tiles? I would prefer to keep my current setup, but if it is unreasonable, don't hesitate to let me know, as I am very new to Godot and game development.