Skip to main content

Screen Hold

screen hold

Use Screen Hold to execute the next node when someone touches and holds the device screen for over 200 ms.

Below is an example of the position coordinates for a screen hold:

position coordinates for a screen hold

Output

NameData TypeDescription
NextExecExecute the next node when someone touches and holds the device screen.
DurationNumberThe time of tapping and holding the screen in seconds.
PositionVec2The 2D normalized position of the tapping point.

Example

screen hold example

↓ screen_hold.zip

This example uses Screen Hold to change the scale of the image. Duration is in milliseconds, so you need to divide by 1000 to convert it into seconds. The position of the screen hold will update the position of the image as well.

It transforms the screen interaction coordinates (left) to 2D transform coordinates (right) of the image by using the Remap node in order to place the image at the point the screen is touched.

transform   2d transform

screen hold node