When my character enters this area, the animal should spawn, but the moment my character enters that box frame, it gives an error.
When my character enters this area, the animal should spawn, but the moment my character enters that box frame, it gives an error.
Hi @Koreliko1 ,
In your blueprint, I think the infinite loop happen because of your Find Spawn Location node. Since if Hit? is false, then it will call Find Spawn Location again. and if it’s always fail, then the infinite loop is occured.
Maybe you need to check your Find Spawn Location function if your implementation already correct and safe or not yet. Maybe you also want to give it a counter so if it’s failed after X time, it will abort and get out from the loop.
I can’t look inside Find Spawn Location because I can’t find it in the link.
Hope this help!
find spawn location code
That’s a bit shady considering you’re scaling a bounds which goes underground, then choosing a random point from that bounds which could be underground.
Then you potentially use that under the map point as a start and then end is further downward.
Looping a trace that could potentially never hit anything.