#gamepad #bindings #motion #gyro #gamepad-motion-helpers

gamepad_motion

Rust bindings for the GamepadMotionHelpers C++ library

3 releases

0.1.2 Oct 27, 2023
0.1.1 Oct 26, 2023
0.1.0 Oct 26, 2023

#1438 in Hardware support


Used in aimu

Custom license

18KB
187 lines

gamepad_motion

Rust bindings for the GamepadMotionHelpers C++ library.

Usage

use gamepad_motion::GamepadMotion;

let mut gm = GamepadMotion::new();
loop {
	// read gyro, accelerometer, elapsed time...
	xy = gm.process(g, a, dt).gyro_player_space(None);
	// update position using xy...
}

Dependencies

~2.6–7MB
~129K SLoC