overlapping

abstract fun overlapping(actorA: Actor, actorB: Actor): Boolean


open fun overlapping(actorA: Actor, others: Iterable<Actor>): Boolean

Do any of others overlap actorA.

If others contains actorA, it is ignored (i.e. an actor never overlaps itself). This lets you check if an actor is overlapping anything on the same stage using :

if ( myOverlapping.overlapping( actorA, actorA.parent.children) ) ...

The default implementation iterates over others and returns true if any of them overlap.

This doesn't give any indication which of others is overlapping, so is no use when you want to cause damage to both overlapping actors. It is often used to check for collisions with scenery. In which case, consider placing all the scenery in a separate stage, so you ever need to filter actors to find only the scenery.