Encourage the point p to be in the direction direction with respect to point pRef. The direction vector does not need to be normalized. The offset parameter is the shortest allowed distance between the points.

  • Parameters

    • p: Vec2

      Point

    • pRef: Vec2

      Reference point

    • direction: Vec2

      Direction vector

    • offset: Num

      Shortest allowed distance

    Returns Num