Class SixDofDragBehavior
Hierarchy
- BaseSixDofDragBehavior
- SixDofDragBehavior
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Returns SixDofDragBehavior
Properties
allow Multi PointerSearch playground for allowMultiPointer
Should the behavior allow simultaneous pointers to interact with the owner node.
current Dragging Pointer IdsSearch playground for currentDraggingPointerIds
In case of multipointer interaction, all pointer ids currently active are stored here
detach Camera ControlsSearch playground for detachCameraControls
/** If camera controls should be detached during the drag
disable MovementSearch playground for disableMovement
Use this flag to update the target but not move the owner node towards the target
drag Delta RatioSearch playground for dragDeltaRatio
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)
draggable MeshesSearch playground for draggableMeshes
The list of child meshes that can receive drag events
If null
, all child meshes will receive drag event
face Camera On Drag StartSearch playground for faceCameraOnDragStart
Should the object rotate towards the camera when we start dragging it
on Drag End ObservableSearch playground for onDragEndObservable
Fires each time a drag ends (eg. mouse release after drag)
on Drag ObservableSearch playground for onDragObservable
Fires each time a drag happens
on Drag Start ObservableSearch playground for onDragStartObservable
Fires each time a drag starts
on Position Changed ObservableSearch playground for onPositionChangedObservable
Fires when position is updated
rotate AroundYOnlySearch playground for rotateAroundYOnly
If rotateDraggedObject
is set to true
, this parameter determines if we are only rotating around the y axis (yaw)
rotate Dragged ObjectSearch playground for rotateDraggedObject
If the object should rotate to face the drag origin
rotate With Motion ControllerSearch playground for rotateWithMotionController
Should the behavior rotate 1:1 with the motion controller, when one is used.
z Drag FactorSearch playground for zDragFactor
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
current Dragging PointerID
Get or set the currentDraggingPointerId
Returns number
Get or set the currentDraggingPointerId
Parameters
currentDraggingPointerID: number
Returns void
current Dragging Pointer Id
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
is Moving
Returns true if the attached mesh is currently moving with this behavior
Returns boolean
name
The name of the behavior
Returns string
Methods
attachSearch playground for attach
Attaches the six DoF drag behavior
Parameters
ownerNode: Mesh
The mesh that will be dragged around once attached
Returns void
detachSearch playground for detach
Detaches the behavior from the mesh
Returns void
initSearch playground for init
Initializes the behavior
Returns void
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