Download

Find closest safe place to put an actor with physics enabled

I want to set an actor’s location (which is obviously perfectly doable using SetActorLocation()). The problem is, that this actor has physics simulation enabled (or rather its root component, which is a static mesh). This means, that if I set the location to somewhere, where another actor has already been placed, then they are overlapping which results in one of them being exploded away.

Is there a way to find a “free” spot that is close to my intended location (in a similar way to SpawnActor(), which allows the adjustment of the location when spawning the new actor)?

Maybe you could build on what’s been discussed in this thread.

1 Like