Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: how to read a joystick ?  (Read 753 times)

0 Members and 1 Guest are viewing this topic.

bluatigro

  • Newbie
  • *
  • Posts: 4
    • View Profile
how to read a joystick ?
« on: April 25, 2013, 10:24:04 am »


i have windowsXP / 7 SFML 1.6

how do i read a USBjoystick
cxiu diferas el tio respondas cxiu samvaloras
[ esperanto : everybody is diferent therefore everybody is equal ]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: how to read a joystick ?
« Reply #1 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?
Laurent Gomila - SFML developer

Ivan

  • Newbie
  • *
  • Posts: 32
  • IT geek
    • View Profile
Re: how to read a joystick ?
« Reply #2 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