Using a selection tool item
- Last UpdatedDec 06, 2023
- 1 minute read
In a manipulation-based system, it is good practice to pick items by using manipulation mode to select them.
To do this, the manipulator must always have an assigned manipulatedNode. See Selection modes.
Initial manipulable item
There must be an initial manipulable item supporting collision through a sensor. This item represents the free hand allowing it to be able to select and pick up other items.
The selection tool item must:
-
Be assigned at the beginning of the activities.
-
Be assigned any time another item is left.
Code example
This is a code example that assigns the selection tool at startup.
<route from="global.onEnter" to="start_manipulator.execute" value="selection_tool" />
<patch name="selection_tool" visible="true"/>
<Timer duration="1" loop="false" name="activationTimer" active="true" />
<route from="activationTimer.cycle" to="sel.selectionActive" value="true" />
Selection tool
The Selection tool can be modeled in many ways. It can be even totally transparent, but it must be present.
