alignToPoint method

void alignToPoint(
  1. Vector3 point, {
  2. Vector3? direction,
})

Implementation

void alignToPoint(Vector3 point, {Vector3? direction}) {
  direction ??= ORIGIN;

  for (var dim in range(end: 3)) {
    if (direction.getComponent(dim) != 0) {
      setCoord(point.getComponent(dim), dim, direction: direction);
    }
  }
}