Object Touch lets players to interact with game objects by tapping or dragging them.
Give the Object Touch node a target and only that object will react to touch. You can also place this node into a scene and define with the Group Filter which objects are affected.
The Type parameter defines whether an object reacts to tapping only, or whether you can drag it during game play.
These parameters are available when the Type is set to Touch Trigger. See below for additional parameters for the Drag Ground and Drag Camera types.
Enabled | Enable or disable to node. Disabled Nodes cannot output links or data | |
Consume Touch | Prevents other touch-related components (like Joystick and Button) from being executed when you tap an object with Object Touch. | |
React Only Physical Objects | Prevents objects without a Physical component from being touched or dragged by the user. *This option is only visible if the Node is not embedded in an Object. |
|
React to Hidden Objects | Objects with Visibility turned off can still be touched by the player | |
“On End” When Disable Cancels Touch | When toggled on, On Touch End output will send a signal if an object is being touched and the node is disabled during game play | |
Type | Touch Trigger | Touch Trigger effectively turns any object into a button. Tapping the object can send signals to nodes or other objects. |
Drag Ground | Allows dragging objects left and right/forward/backward along the ground based on the orientation of the Game Camera. An object needs to be Dynamic in order to be draggable. |
|
Drag Camera | Allows dragging objects left and right & up and down based on the orientation of the Game Camera. An object needs to be Dynamic in order to be draggable. |
|
Group Filter | Object Touch will only work in objects that have Color Groups specified here. *This option is only visible if the Node is not embedded in an Object. |
|
On Touch Start | Sends signals or values at the start of the touch | |
On Touch Move | Sends signals or values all the time when the object is dragged or touched, on each frame | |
On Touch End | Sends signals or values when the touch ends |
If you select the Drag Ground or Drag Camera type, you can access these additional parameters.
Drag Center Pivot | Drag an object from the center regardless of where the touch is initiated | |
Release Out of Range | The object is released if it's dragged beyond the Drag Max Length | |
Drag Force | The Force that is applied to the object when it is being dragged | |
Drag Slowing | Slows the movement of dragged objects. Min Value = 0, Max Value = 1 | |
Drag Max Length | Sets the maximum distance an object can be dragged |
Here's a link to a demo that shows how to use the Object Touch node: