Options
All
  • Public
  • Public/Protected
  • All
Menu

A behavior that when attached to a mesh will allow the mesh to be dragged around based on directions and origin of the pointer's ray

Hierarchy

Index

Constructors

Properties

allowMultiPointer: boolean

Should the behavior allow simultaneous pointers to interact with the owner node.

currentDraggingPointerIds: number[]

In case of multipointer interaction, all pointer ids currently active are stored here

detachCameraControls: boolean

/** If camera controls should be detached during the drag

disableMovement: boolean

Use this flag to update the target but not move the owner node towards the target

dragDeltaRatio: number

The distance towards the target drag position to move each frame. This can be useful to avoid jitter. Set this to 1 for no delay. (Default: 0.2)

draggableMeshes: Nullable<AbstractMesh[]>

The list of child meshes that can receive drag events If null, all child meshes will receive drag event

faceCameraOnDragStart: boolean

Should the object rotate towards the camera when we start dragging it

onDragEndObservable: Observable<{}>

Fires each time a drag ends (eg. mouse release after drag)

onDragObservable: Observable<{ delta: Vector3; pickInfo: PickingInfo; position: Vector3 }>

Fires each time a drag happens

onDragStartObservable: Observable<{ position: Vector3 }>

Fires each time a drag starts

onPositionChangedObservable: Observable<{ position: Vector3 }>

Fires when position is updated

rotateAroundYOnly: boolean

If rotateDraggedObject is set to true, this parameter determines if we are only rotating around the y axis (yaw)

rotateDraggedObject: boolean

If the object should rotate to face the drag origin

rotateWithMotionController: boolean

Should the behavior rotate 1:1 with the motion controller, when one is used.

zDragFactor: number

How much faster the object should move when the controller is moving towards it. This is useful to bring objects that are far away from the user to them faster. Set this to 0 to avoid any speed increase. (Default: 3)

Accessors

  • get currentDraggingPointerID(): number
  • set currentDraggingPointerID(currentDraggingPointerID: number): void
  • Get or set the currentDraggingPointerId

    deprecated

    Please use currentDraggingPointerId instead

    Returns number

  • Get or set the currentDraggingPointerId

    deprecated

    Please use currentDraggingPointerId instead

    Parameters

    • currentDraggingPointerID: number

    Returns void

  • get currentDraggingPointerId(): number
  • set currentDraggingPointerId(value: number): void
  • The id of the pointer that is currently interacting with the behavior (-1 when no pointer is active)

    Returns number

  • The id of the pointer that is currently interacting with the behavior (-1 when no pointer is active)

    Parameters

    • value: number

    Returns void

  • get isMoving(): boolean
  • Returns true if the attached mesh is currently moving with this behavior

    Returns boolean

  • get name(): string
  • The name of the behavior

    Returns string

Methods

  • attach(ownerNode: Mesh): void
  • Attaches the six DoF drag behavior

    Parameters

    • ownerNode: Mesh

      The mesh that will be dragged around once attached

    Returns void

  • detach(): void
  • init(): void

Legend

  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Static method

Settings

Theme