Used by SnapToSurfacesDragStrategy for two-pointer (multi-touch) drags. Casts a downward ray each frame from the follow object's world position and adjusts it so the dragged object's bounding-box contact face rests on the detected surface.

Only injected into the constraint pipeline for multi-touch; the single-pointer path continues to use SnapToSurfacesDragStrategy.update (pointer ray + drag plane intersection) unchanged.

Implements

  • IDragConstraint

Constructors

Methods

Constructors

Methods

  • Modifies followObject in-place. Invoked after position is resolved each frame.

    Parameters

    Returns void

  • Called once at drag start and again whenever the drag context resets (e.g. multi-touch → single-pointer transition). Capture any object snapshot (position, rotation, scale) you need to hold fixed during the drag. Constraints that need no dynamic initialization may omit this method.

    Parameters

    • ctx: IDragConstraintContext

    Returns void