Skip to content

Commit 8cc930a

Browse files
committed
Debug Mode: change Touch Input plugin
Increase the movement threshold of the Touch Input Fixes #137
1 parent 42a52d6 commit 8cc930a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/debug_mode/plugins/touch_input.ss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ object "Debug Mode - Touch Input" is "debug-mode-plugin", "debug-mode-observable
118118
{
119119
touchArray = [];
120120
observable = spawn("Debug Mode - Observable");
121+
//movementThreshold = 0.0; // generates tapping issues on some Samsung devices
122+
movementThreshold = 0.9;
121123

122124
state "main"
123125
{
@@ -133,7 +135,7 @@ object "Debug Mode - Touch Input" is "debug-mode-plugin", "debug-mode-observable
133135
state "touching"
134136
{
135137
if(Mouse.buttonDown("left")) {
136-
moved = (Mouse.position.distanceTo(touchArray[0].position) > 0.0);
138+
moved = (Mouse.position.distanceTo(touchArray[0].position) > movementThreshold);
137139
phase = moved ? "moved" : "stationary";
138140
touch = Touch(phase, Mouse.position, touchArray[0].position, touchArray[0].initialPosition);
139141
touchArray[0] = touch;

0 commit comments

Comments
 (0)