So I’m working on a tile-based game that involves a computer controlled character wandering randomly across the map. On the map, there are certain tiles the character can and can’t walk on, and I’m wondering what would be the best method for having the character make legal moves.
Right now, I have the game map stored as a variable attached to the main camera, so I could have the character pull from that every time they want to move. My other thought was using a Raycast to determine the properties of the tiles surrounding the character, and making moves based off that. I was wondering if either of those would be faster, or if either is more “proper” in terms of game design. Thanks so much!