- Home /
The question is answered, right answer was accepted
Spawn Objects on Walkable Surfaces
So I have a few enemies that use the Navmesh system to find their way to the player. Now I want my enemies to spawn on walkable surface(the blue part) of the Navmesh. I want the spawn coordinates to be random but inside the walkable surface as I don't want them inside the walls over my surface.
Is there some way that I can get walkable surface and limit the coordinates only inside the surface. What I could do is that Shine a ray down on the arena and if its the walkable surface then that's where the enemy will spawn, but I still need a way to make sure its the walkable surface.
Answer by eraban · Jul 10, 2021 at 02:48 PM
So i just got the answer. I used the above method but instead of using Navmesh to determine spawn coordinates, what I used was tags. If the ray hit an obstacle with a certain tag it would run the process again and again until there was a suitable place to spawn and spawn the enemy.
Follow this Question
Related Questions
NavMesh Sample Position Help 1 Answer
Trying to make a spawning enemy code 1 Answer
Navmesh problem with SpawnSystem 0 Answers
How to increase int every 5 waves? 1 Answer
Spawning help 1 Answer