Projects the grabbed attachment point back onto a plane after position is resolved, with optional grid snapping on that plane. Owned by the strategy that requires plane-clamping (e.g. XZPlaneDragStrategy).

Implements

  • IDragConstraint

Constructors

Properties

hitPointInLocalSpace: null | Vector3 = null

Attachment point in dragged-object local space. Set once at drag start; the handler mutates this Vector3 in-place so updates are reflected automatically.

plane: Plane

Plane to project the grabbed point onto. Typically the strategy's fixed drag plane.

snapResolution: number = 0

Grid snap resolution on the plane. 0 = projection only, no snapping.

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