menu

GamepadMotion

import { GamepadMotion } from "destack:input/binding";

Gamepad motion state snapshot.

language/library/src/input/binding/gamepad.ds:92:113
1export struct GamepadMotion {2    timestampNs: uint64;3    accelerationX: float64;4    accelerationY: float64;5    accelerationZ: float64;6    gravityX: float64;7    gravityY: float64;8    gravityZ: float64;9    gyroscopeX: float64;10    gyroscopeY: float64;11    gyroscopeZ: float64;12}

Members

timestampNs: uint64

Monotonic update timestamp in nanoseconds.

accelerationX: float64

Linear acceleration x component in meters per second squared.

accelerationY: float64

Linear acceleration y component in meters per second squared.

accelerationZ: float64

Linear acceleration z component in meters per second squared.

gravityX: float64

Gravity x component in meters per second squared when available.

gravityY: float64

Gravity y component in meters per second squared when available.

gravityZ: float64

Gravity z component in meters per second squared when available.

gyroscopeX: float64

Rotation rate around x in radians per second.

gyroscopeY: float64

Rotation rate around y in radians per second.

gyroscopeZ: float64

Rotation rate around z in radians per second.