Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BaseSixDofDragBehavior

Base behavior for six degrees of freedom interactions in XR experiences. Creates virtual meshes that are dragged around And observables for position/rotation changes

Hierarchy

Implements

Index

Properties

allowMultiPointerSearch playground for allowMultiPointer

allowMultiPointer: boolean

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

currentDraggingPointerIdsSearch playground for currentDraggingPointerIds

currentDraggingPointerIds: number[]

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

detachCameraControlsSearch playground for detachCameraControls

detachCameraControls: boolean

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

draggableMeshesSearch playground for draggableMeshes

draggableMeshes: Nullable<AbstractMesh[]>

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

onDragEndObservableSearch playground for onDragEndObservable

onDragEndObservable: Observable<{}>

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

onDragObservableSearch playground for onDragObservable

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

Fires each time a drag happens

onDragStartObservableSearch playground for onDragStartObservable

onDragStartObservable: Observable<{ position: Vector3 }>

Fires each time a drag starts

zDragFactorSearch playground for zDragFactor

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

currentDraggingPointerID

  • get currentDraggingPointerID(): number
  • set currentDraggingPointerID(currentDraggingPointerID: number): any
  • 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 any

currentDraggingPointerId

  • get currentDraggingPointerId(): number
  • set currentDraggingPointerId(value: number): any
  • 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 any

isMoving

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

    Returns boolean

name

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

    Returns string

Methods

attachSearch playground for attach

  • Attaches the scale behavior the passed in mesh

    Parameters

    • ownerNode: TransformNode

      The mesh that will be scaled around once attached

    Returns void

detachSearch playground for detach

  • detach(): void
  • Detaches the behavior from the mesh

    Returns void

initSearch playground for init

  • init(): void
  • Initializes the behavior

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method