private boolean isDistanceToLarge(LocationComponent characterLocation, LocationComponent targetLocation, float maxInteractionRange) {
float maxInteractionRangeSquared = maxInteractionRange*maxInteractionRange;
Vector3f positionDelta = new Vector3f();
positionDelta.add(characterLocation.getWorldPosition());
positionDelta.sub(targetLocation.getWorldPosition());
float interactionRangeSquared = positionDelta.lengthSquared();
// add a small epsilon to have rounding mistakes be in favor of the player:
float epsilon = 0.00001f;
return interactionRangeSquared > maxInteractionRangeSquared + epsilon;
}