Hello, I am stuck on one thing. I would like to ensure that the enemies spawn on the grass and not in the water and not on the colliders. I created the map using the Tiled program. Is there an effective solution? Thank you.
The easier way IMO is to randomize a position in (x, y) and then do a collider cast against the tree/water layer, if this pass, create the enemy, otherwise start again.
Okay, and how to do this collider test? Thank you!
Thought Overlap API