← Back

ofxJoystick

github.com/Lacty/ofxJoystick · @Lacty
OF 0.12 Releases Hardware Interface

simple joystick library for openFrameworks

4 5 Last commit 2y ago Created 10y ago

Forks

Forks pushed to more recently than Lacty/ofxJoystick itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

ofxyz/ofxJoystick by @ofxyz · ★ 0 · pushed 2mo ago

README

ofxJoystick



usage

// in header
ofxJoystick joy_;

// in yourApp::setup()
joy_.setup(GLFW_JOYSTICK_1);

// now get axis from your Gamepad!
float XAxis = joy_.getAxis(0);
float YAxis = joy_.getAxis(1);

// and get button input
if (joy_.isPressed(0)) { ofLog() << "pressed 0"; }
if (joy_.isPushing(0)) { ofLog() << "pushing 0"; }
if (joy_.isRelease(0)) { ofLog() << "release 0"; }


my another ofxAddon

ofxKeyboard for KeyInput in !yourApp::keyPressed

contact

@Lost206 -twitter akira206@gmail.com -gmail

lisence

ofxJoystick under MIT lisence

Get this addon

HTTPS
SSH

Latest release

v1.0.2 published 9y ago
add ofRemoveListener in destructor