Manipulator
- Last UpdatedDec 14, 2023
- 3 minute read
The Manipulator node manages the manipulable items.
It provides the following functionalities:
-
Manipulation of manipulable item nodes
-
Manipulated node interaction with attach points
-
Manipulated node collision with other item nodes
Platform support
This node is supported on XR-Windows platform only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
Guidelines
There can only be one manipulator node instance. It is already defined in the modules.
The Manipulator node is deeply connected to the InteractionSelector that has specific dedicated functionalities.
See the Using the manipulation system for more information on how to set up and manage a manipulation-based application.
Multiple manipulated items
Typically, Manipulator handles one manipulable object at a time.
-
The manipulated object is assigned to the right hand.
In some cases, you can to add a secondary manipulated object. Both can manage collisions, but there are limitations:
-
Secondary manipulated items are assigned to left hand.
-
The InteractionSelector refers only to the primary manipulated object.
-
The interaction with the attach points is managed only for the primary object.
Code example
This is a code example for the Manipulator node.
<Manipulator name="manipulator" active="true"/>
Manipulator fields
These are the fields for Manipulator node. Only the node-specific fields are indicated, not fields obtained by inheritance.
Field inheritance: NodeBase > Manipulator
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
active |
sbool |
Optional |
false |
Enables/disables the manipulation system. |
|
attach |
sevent |
Optional |
Releases the currently manipulated item positioning on the nearAttachPoint. If the nearAttachPoint is empty, it leaves the manipulated item where it is. |
|
|
collisionWithNode0 |
sstring |
Read only |
Internally calculated |
Name of the item node with which the manipulated item is colliding. If no collision happens, the parameter is empty. |
|
collisionWithNode1 |
sstring |
Read only |
Internally calculated |
Name of the item node with which the secondary manipulated item is colliding. If no collision is happening, the parameter is empty. |
|
defaultManipulablePosition0 |
svec3 |
Optional |
Taken from manipulable manipulatorPosition |
Debug functionality that can be used in screen mode to move the position of the manipulable that is assigned to main hand. This is useful when there is need to interact with two manipulables together. |
|
defaultManipulablePosition1 |
svec3 |
Optional |
Taken from manipulable manipulatorPosition |
Debug functionality that can be used in screen mode to move the position of the manipulable that is assigned to auxiliary hand. This is useful when there is need to interact with two manipulables together. |
|
isManipulating |
sbool |
Read only |
Internally calculated |
Changes to true when the manipulator is manipulating a node. |
|
nearAttachPoint |
sstring |
Read only |
Internally calculated |
Name of the nearest AttachPoint that the manipulated item can interact with. The item must be inside the radius sphere of the AttachPoint. |
|
manipulatedNode |
sstring |
Read only |
Internally calculated |
Name of the currently manipulated node. |
|
manipulateNode |
sstring |
Optional |
Can be used to set the manipulated node. Usually this functionality is managed using start_manipulator and stop_manipulator library commands rather than directly. It accepts a single manipulable item name or two pipe separated (|) manipulable item names. The first becomes the manipulatedNode. |