moveToPositionAlongThePath method

void moveToPositionAlongThePath(
  1. Vector2 position, {
  2. List? ignoreCollisions,
})

Implementation

void moveToPositionAlongThePath(
  Vector2 position, {
  List? ignoreCollisions,
}) {
  this.ignoreCollisions.clear();
  this.ignoreCollisions.add(this);
  if (ignoreCollisions != null) {
    this.ignoreCollisions.addAll(ignoreCollisions);
  }

  _currentIndex = 0;
  _calculatePath(position.toOffset());
}