getting distance from objetcs

Try this:

distance = actor.getDistance(otherObject)

You can also swap those two, that doesn’t matter at all:

distance = otherObject.getDistance(actor)