Gyroscope tilt steering added to mobile chariot racing game via DeviceOrientation API
Developer pj90 has added gyroscope-based tilt steering to a mobile chariot racing game, allowing players to steer by physically tilting their device. The feature uses the DeviceOrientation API and includes an iOS 13+ permission flow that must be triggered within a user gesture. A new GyroscopeControls class reads the device's gamma axis and maps tilt angles beyond a configurable ±10° deadzone to left or right steering inputs. A HUD button, visible only on touch devices with orientation sensors, lets players enable the feature and recalibrate the neutral baseline at any time. The update also adds English and Hindi localisation strings for all gyroscope-related UI elements and alerts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in