|Name of gadget||Grab sensor|
|Section||Sensors & Input|
|Number of Tweak pages||1|
|Last updated||13 March 2020 [v2.06]|
This gadget allows you to detect when the imp interacts with objects in a scene. The object’s physical properties determine whether or not an item can be moved by an imp, but this gadget allows you to read that “grabbing” in order to turn drive other logic, such as turning on a light. This gadget also allows “hover” effects that output a signal when the imp tip is merely resting on the object.
Example Tutorial (from Media Molecule)
- Stamp a cube
- Add a grab sensor and surface snap it to the cube.
- In the cube tweak menu go to physical properties and select grab under imp interaction
- In outer properties push up the glow slider to 50%
- Connect the grabbed output on the grab sensor to the glow slider input in your cube.
- Switch to test mode
- Grab the shape. It will glow.
- Try the same but with the hover output instead of grabbed.
Screenshot from Early Access; confirmed identical in v2.06
- Number of imps required
You can set how many imps need to be grabbing an object to trigger the gadget, for multiplayer purposes. You can choose “ALL” to require all active players, or select a number from 1 to 4. For the purposes of input/output wires, “ALL” is represented by the value 0.
- Sense Grab
Connect a wire from this input to the object(s) that you want to test being grabbed. Alternatively, if you snap the gadget to an object, or to a microchip snapped on the object, that object defaults to being the one tested.
This outputs a continuous signal while the object is question is being grabbed by the required number of players. Player information can be split out to determine which player is doing the grabbing.
Rather than having to grab an object, this output provides a signal when the imp’s tip is hovering over the object. Note that actually grabbing the object turns this signal off, even though it is still arguably hovering over the object. As with the Grabbed output, there must be enough imps hovering over the object as specified in “Number of imps required”. You might use this for example to highlight the object that the player is looking at before they commit to grabbing it.
- Imp Stretch
When an object is being grabbed, this output provides a variable signal between 0 and 1, determined by the amount that the imp tip is being stretched at the time, which depends on how far the player is holding the imp away from the point being grabbed. Note that it is possible for this value to read 0 even when the imp is successfully grabbing the object, especially when using the stick-based control scheme. Again, this will only output a signal when the requisite number of imps is grabbing the object.
This is where you can turn the gadget on/off