Used by SnapToSurfacesDragStrategy for two-pointer (multi-touch) drags. Each frame MultiTouchDragHandler aims the snap ray from the pointer origin(s) through the current two-finger grab midpoint (see setRay); apply() casts that ray into the scene and places the follow object so its bounding-box contact face rests on the hit surface with the object origin at the hit point — the same "snap to what the pointer points at" semantics as the single-pointer surface raycast.

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

  • Sets the world-space snap ray for this frame. Called by MultiTouchDragHandler before the constraint pipeline runs. direction must be normalized.

    Parameters

    Returns void