TouchingActors unreliable?

I’m adding some code to prevent actors being placed over other actors by players during gameplay.

I’m using the TouchingActors iterator every tick while placing.

I’m finding that sometimes it’s returning actors when they are still a small distance away from the main actor I’m checking (their collision doesn’t overlap), yet apparently they are still “touching”…

The inaccuracies in the touching distance seem to vary if I check at different areas of the map.

Is there some approximation or something that the engine is doing that can account for this inaccuracy?

we use this to check distance.

           //flag           //N IS PLACE TO SPAWN AS LONG AS ITS 1500 OR CLOSER TO FLAG
 if (VSize(CPFlag.Location - N.Location) < 1500.0)

That is just checking the center location from another center location. I am talking about the collision meshes overlapping.

Oh your talking about not spawning on top of each other? So this must be for placed actors that the pawns place?

Edit: look at what keeps you from spawning your player over the top of another player. That code should help you out. You should be able to use that for actor over actor.

Good idea :slight_smile: Thanks