#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

#884 in Hardware support

Download history 8/week @ 2024-02-19 12/week @ 2024-02-26 4/week @ 2024-03-11 56/week @ 2024-04-01

60 downloads per month
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.5–7MB
~129K SLoC