Touch Sensor: Difference between revisions
-u ndefined- (talk | contribs) m (Add folder parameter) |
-u ndefined- (talk | contribs) m (Add example and related) |
||
Line 25: | Line 25: | ||
The second setting changes how many fingers have to be touching the screen to trigger the touch sensor. | The second setting changes how many fingers have to be touching the screen to trigger the touch sensor. | ||
== Example == | |||
To determine which left or right side of the screen is touched: | |||
{{Image|Touch_Sensor_left_or_right.png}} | |||
== Related == | |||
* [[Swipe Sensor]] | |||
[[Category:Blocks]] | [[Category:Blocks]] |
Latest revision as of 16:24, 27 June 2024
Touch Sensor
Type | Script block |
Collider | None |
Folder | Control |
Ports | |
---|---|
Inputs | Before |
Outputs | Touched Screen X Screen Y After |
Touch Sensor allows to get user input from screen touch or a mouse.
Settings

The touch sensor has two settings, which can be changed by selecting the script and tapping the buttons that appear in the bottom right corner.
The first setting has three options:
- Touching: The touch sensor will trigger every frame during touching
- Begins: The touch sensor will trigger once when touching begins
- Ends: The touch sensor will trigger once when touching stops
The second setting changes how many fingers have to be touching the screen to trigger the touch sensor.
Example
To determine which left or right side of the screen is touched:
