Options
All
  • Public
  • Public/Protected
  • All
Menu

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

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

draggableMeshes: Nullable<AbstractMesh[]>

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

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

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

  • Attaches the scale behavior the passed in mesh

    Parameters

    • ownerNode: TransformNode

      The mesh that will be scaled around once attached

    Returns void

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

    Returns void

  • init(): void
  • Initializes the behavior

    Returns void

Legend

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

Settings

Theme