Class BaseSixDofDragBehavior
Hierarchy (View Summary)
- BaseSixDofDragBehavior
Implements
Constructors
constructor
-
Returns BaseSixDofDragBehavior
Properties
allow Multi Pointer
Should the behavior allow simultaneous pointers to interact with the owner node.
current Dragging Pointer Ids
In case of multipointer interaction, all pointer ids currently active are stored here
detach Camera Controls
/**
- If camera controls should be detached during the drag
draggable Meshes
The list of child meshes that can receive drag events
If null, all child meshes will receive drag event
on Drag End Observable
Fires each time a drag ends (eg. mouse release after drag)
on Drag Observable
Fires each time a drag happens
on Drag Start Observable
Fires each time a drag starts
z Drag Factor
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
attached Node
-
Attached node of this behavior
Returns Nullable<TransformNode>
current Dragging Pointer Id
-
get currentDraggingPointerId(): number
The id of the pointer that is currently interacting with the behavior (-1 when no pointer is active)
Returns number
-
set currentDraggingPointerId(value: number): void
Parameters
- value: number
Returns void
current Dragging Pointer ID
-
get currentDraggingPointerID(): number
-
set currentDraggingPointerID(currentDraggingPointerID: number): void
Parameters
- currentDraggingPointerID: number
Returns void
is Moving
-
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
attach
-
Attaches the scale behavior the passed in mesh
Parameters
- ownerNode: TransformNode
The mesh that will be scaled around once attached
Returns void
- ownerNode: TransformNode
detach
-
Detaches the behavior from the mesh
Returns void
init
-
Initializes the behavior
Returns void
Base behavior for six degrees of freedom interactions in XR experiences. Creates virtual meshes that are dragged around And observables for position/rotation changes