Finger Touch
Use Finger Touch to take different executions when the device screen is touched by one or two fingers and when the device screen is not touched.
note
For two-touch to be detected, the first finger can not leave the screen when the second finger is detected. Touch 0 is the first finger detected on the screen; and Touch 2 is the second finger, in addition to the first finger, detected on the screen.
Input
Name | Data Type | Description |
---|---|---|
Detect | String | Choose Touch 0 to detect the first touch; choose Touch 1 to detect the second touch |
Output
Name | Data Type | Description |
---|---|---|
Idle | Exec | Execute the next node when no finger touch detected on the device screen |
On Start | Exec | Execute the next node as soon as someone's finger touches the device screen |
Stay | Exec | Execute the next node when someone's finger stays on the device screen |
On Stop | Exec | Execute the next node as soon as someone's finger leaves the device screen |
Current Position | Vec2 | The position of tapping point in the current frame. If the node execution is Idle (no touch detected), this position returns (-1, -1). |
Last Updated | Vec2 | The position of last updated tapping point |
Test the Effect
note
Two-touch can only be tested in the TikTok app.
Test your effect on your mobile device by scanning the QR code from within the TikTok app. Learn more about how to preview your effect. Be sure to point your camera at an image of the target texture.