SFML community forums

Help => General => Topic started by: bluatigro on April 25, 2013, 10:24:04 am

Title: how to read a joystick ?
Post by: bluatigro on April 25, 2013, 10:24:04 am


i have windowsXP / 7 SFML 1.6

how do i read a USBjoystick
Title: Re: how to read a joystick ?
Post by: Laurent on April 25, 2013, 10:38:56 am
Please read the documentation and tutorials.

Will you post for every task that you start, before reading some doc and trying to figure out things by yourself?
Title: Re: how to read a joystick ?
Post by: Ivan on April 30, 2013, 11:48:50 pm
Hi! First of all, I advise you change to SFML 2.0. It's includes a complete documentation. Take a look, it's free  :P

Some clues:

sf::Joystick::isConnected(0)
sf::Joystick::getAxisPosition(0, sf::Joystick::X)
sf::Joystick::getAxisPosition(0, sf::Joystick::Y)

A final clue:
http://www.sfml-dev.org/documentation/2.0/classsf_1_1Joystick.php (http://www.sfml-dev.org/documentation/2.0/classsf_1_1Joystick.php)