Phones: dual floating thumbsticks (move right, attack left)

TouchSticks: a finger on the right half of the screen is a move stick where it lands (the move_* actions), one on the left half an attack stick (the aim_* actions, with fire held past the aim dead zone, so the weapon attacks that way each time it's ready). Buttons get their touches first; the sticks only act while the scarecrow can, and a pause or freeze lets them go.

On phones a tap is also an emulated left click, so fire and offhand lose their mouse buttons and ScarecrowCombat ignores emulated mouse events for its aim device. A held finger still skips the intro, and a tap skips the farmers' return.

Docs: the first device run's numbers (night 20 held 60 FPS) and the sticks. Graph update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Forrest 2026-10-14 13:48:59 -04:00
parent 59aa97c7a3
commit 8c81d815eb
19 changed files with 3917 additions and 3655 deletions

View file

@ -247,6 +247,8 @@ func _input(event: InputEvent) -> void:
if remote != null:
return
_edges.note(event, SWITCH_ACTIONS)
if event is InputEventMouse and event.device == InputEvent.DEVICE_ID_EMULATION:
return # a phone's tap (Godot's emulated mouse) isn't the mouse: TouchSticks aims there
if event is InputEventMouseMotion:
if device == Device.GAMEPAD:
_mouse_travel += (event as InputEventMouseMotion).relative.length()