Screen Touch node triggers events based on the position, speed or angle of a player's screen touch. It can also detect how many fingers touch the screen.
Tracking screen touches and mapping them into game events is a key method for creating interaction in mobile games.
Enabled | Enable or disable the node. Disabled nodes cannot output links or data |
Average Speed & Angle | Calculates the average speed & angle over the duration of touch input |
Relative To Start Position | Determines if the touch move position is relative to the touch start position |
Use Absolute Coordinates | When enabled, touch coordinates are mapped to device pixel coordinates When disabled, touch coordinates are mapped to a custom X and Y range that is defined with Min/Max Values (see below) |
Touch Filtering | When enabled ignores movement on touches that last under 50 milliseconds. Does not affect detection of Touch Start & End positions |
“On End” When Disable Cancels Touch | When toggled on, On Touch End output will send a signal if there is an ongoing touch and the node is disabled during game play |
Listen To | Determines which touch inputs the node listens. The node can detect 5 touches simultaneously |
On Touch Start | Sends the touch position as an XY location vector when the touch starts |
On Touch Move | Sends the touch position as an XY location vector countinuously when the user moves the finger on the screen |
On Touch End | Sends the touch position as an XY location vector when the touch ends |
Touch X | Sends the X position of the touch |
↳ Min/Max Value | Defines the minimum and maximum values that the X position can get * Works only if Use Absolute Coordinates is off |
Touch Y | Sends the Y position of the touch |
↳ Min/Max Value | Defines the minimum and maximum values that the Y position can get * Works only if Use Absolute Coordinates is off |
Touch Angle | Sends the angle of the touch |
Touch Speed | Sends the speed of the touch input |
↳ Min/Max Value | Defines the minimum and maximum values that the Touch Speed can get * Works only if Use Absolute Coordinates is off |
Here's a link to a demo that shows how to use the Screen Touch node: