Download

spawn object at closest valid point

I want to spawn an object as close as possible to a point however I need to be sure it is at least 100 units from other objects so it doesnt overlap etc how can I do this?

I dont care about the orientation that I know how to handle at least :slight_smile:

thanks!

EQS would be the simplest method if your not comfortable creating your own search algorithm.

Isn´t this what you’re looking for? https://docs.unrealengine.com/latest/INT/BlueprintAPI/AI/Navigation/GetRandomReachablePointinRadius/index.html

The issue with that, I found, is that it uses the NAV data. So often I’d you spawn 2 things in quick succession the NAV mesh doesn’t tick between that time period and that node will fail. However if you’re using pre-computed NAV volume it should work. Another way to do it is brute force, check 4 sides of the original point at a distance of 100 units away, spawn in the first available position. If all blocked, check the diagonals at 100 units away.