getDistance method

dynamic getDistance()

Implementation

getDistance() {
  return object.position.distanceTo(target);
}