While Touching

Description

Trigger an event while your finger is touching an object. The triggered event is called repeatedly until you release your finger from the screen.

 

Properties

Triggers Repeatedly on Event

Object A

This is the object that will trigger the event when touching.

Use World Coordinates

This toggle switches the output to be relative to the world instead of the bottom left corner of the object. 

 

Outputs

X Position This will output the x coordinates where you touch.
Y Position This will output the y coordinates where you touch.

 

Object ID

 

This outputs the Object ID.

 

Examples

Using this behavior you can trigger a gun to repeatedly shoot while you are pressing the shoot button.

Download Example Project

 

Related

Started Touching

Stopped Touching

 

WhileTouchingReference.gif

0 Comments

Article is closed for comments.