You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scale touch steering to the display and add a center dead zone
Drag-steering was too sensitive: full lock took a horizontal drag of
0.12 * min(width, height) px, but the drag delta was measured against
width -- so on a landscape phone (min = height) full lock landed at only
~6% of screen width. Base the travel on window width instead
(g_steerTravelFrac = 0.16): SDL touch-X is width-normalized, so the pixel
dimensions cancel and full lock is a consistent 16%-of-width drag that
scales with any display.
Add a 10% center dead zone with rescale-to-full (g_steerDeadZoneFrac),
mirroring the gamepad axis dead zone in dinput.cpp's ScaleAxis (which the
touch override otherwise bypasses), so a resting thumb no longer weaves
the car while holding throttle.
Factor the drag->steer math into a shared SteerFromFinger helper, and
render the origin ring as a compact min-based thumb-well
(g_steerRingFrac) decoupled from the travel so the calmer steering does
not inflate the overlay; the thumb dot maps the steer value onto the ring
(centered in the dead zone, at the edge at full lock).
The MiniwinTouch_GetSteer contract is unchanged ([-1, 1], positive steers
left), so PlayerControls' rate shaping consumes it as before. No decomp
or game-side code touched.
0 commit comments