Aim by dragging at them, so the thumb stops walking into the iOS edge
The slingshot pulled back, which meant every shot ended with the thumb lower than it started — and the next touch begins where the last one ended. Over a horde it walks itself into the bottom edge strip, where a pull down is Reachability and iOS takes the gesture. A web page cannot refuse that. So the drag now points AT the target: the thumb ends high and drifts up-screen, away from the edge. It also matches the flick-swing, which always aimed this way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b23a3a8aaf
commit
d4bbcfc080
5 files changed
+29
-22
No files matched your search
@@ -42,7 +42,7 @@ export function takeFlickAim(maxAgeMs = 450) {
|
||||
}
|
||||
|
||||
// the two-stage serve: a drag that STARTS at a serveable pretoss aims a visible reticle
|
||||
// (G.aim, drawn by render); release fires the serve there, dragging back home cancels.
|
||||
// (G.aim, drawn by render); release fires the serve there, dragging home again cancels.
|
||||
// EVERY phase of splatter play, so the drag never silently turns into something else. The old
|
||||
// "drag walks the player" mode between shots was invisible state and read as a bug.
|
||||
const canAimServe = () =>
|
||||
@@ -90,10 +90,16 @@ cv.addEventListener('touchmove', e => {
|
||||
if (t.identifier !== stick.id) continue;
|
||||
const dx = t.clientX - stick.x0, dy = t.clientY - stick.y0, dist = Math.hypot(dx, dy);
|
||||
if (dist > DEAD) stick.moved = true;
|
||||
if (stick.aimable) { // slingshot: PULL BACK, launch forward — the shot is the inverse of the drag
|
||||
// Drag TOWARD the target, not back from it. It used to be a slingshot (pull back, launch
|
||||
// forward) and that felt better — but every shot then ended with the thumb LOWER than it
|
||||
// started, and the next touch begins where the last one ended. Over a horde the thumb walks
|
||||
// itself into the iOS bottom edge and a pull becomes Reachability. Dragging at them walks it
|
||||
// UP-screen instead, away from the edge. It also matches the flick-swing below, which always
|
||||
// aimed this way.
|
||||
if (stick.aimable) {
|
||||
if (dist > DEAD) {
|
||||
if (!stick.tossed) { serveToss(); stick.tossed = true; } // the pull kicks off the toss animation
|
||||
G.aim = { fx: -dx / dist, fy: -dy / dist, mag: dist };
|
||||
if (!stick.tossed) { serveToss(); stick.tossed = true; } // the drag kicks off the toss animation
|
||||
G.aim = { fx: dx / dist, fy: dy / dist, mag: dist };
|
||||
// the moment the pull is strong enough to actually splatter, it clicks — you can feel
|
||||
// where the threshold is without watching the reticle
|
||||
const hot = pullQuality(dist) >= TUNE.zSplatQ;
|
||||
|
||||
Reference in new issue
Block a user