Result of a pick operation.

Accessors

  • get snappedToVertex(): boolean

    Returns true if picking has snapped to the canvas coordinates of the nearest vertex. When this is true, then PickResult.snappedCanvasPos will contain the canvas coordinates of the nearest position on teh nearest vertex.

    Not gated on viewObject — snap can land on a vertex when the cursor is in empty space (no surface ray hit), and we want callers to see that.

    Returns boolean

  • get worldPos(): Vec3

    Picked World-space point. Populated when the surface ray hit an object's surface OR when a snap-to-vertex / snap-to-edge landed (in which case it's the snapped point's world position — which can be valid even with no surface hit, e.g. the cursor was in empty space adjacent to a vertex).

    Gated on gotWorldPos only — NOT on viewObject. The snap path resolves a worldPos without an associated picked object when the cursor is in empty space; a viewObject-gated check would silently drop those snap hits.

    Returns Vec3