Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / axial input from gamepad thumbstick
- - By jtuttle Date 2013-12-05 01:17
Hi all. Just started using Gosu and I was really hoping to be able to use a gamepad thumbstick for 360 degree aiming purposes. Is this at all possible? Seems like you can only respond to left/right/up/down rather than the angle of the thumbstick. I've searched around a bit on the forums and via Google but haven't come up with anything useful. Thanks.
Parent - By jahmaican Date 2013-12-05 22:36
I don't think it's possible. Gosu input handling is not the best thing in the world in general (sorry, but it's very true).

What you could do is using something like joy2key to map the stick to mouse movement. Not particularly smooth solution, but should work pretty good.
Parent - - By RavensKrag Date 2013-12-20 03:40
You might want to look for a way to get gamepad inputs using Ruby that's not related to Gosu.

Gosu's input system is extremely minimal, so it doesn't handle stuff like this.  But that doesn't mean there's not some other library that could help you.  That being said, I do not know of one.  There are certainly many C/C++ libraries that do stuff like this though.

(If anyone manages to find one, I would like to know. Don't want to have to write my own =/)
Parent - By RunnerPack Date 2013-12-20 06:09
I found this: http://sourceforge.net/projects/wgois/ but the only Ruby binding I could find (https://github.com/abexsoft/ruby-ois) is Linux-only :(

Anybody know what would be required to modify the binding to be cross-platform? Maybe someone more familiar with SWIG could make a new binding?
Up Topic Gosu / Gosu Exchange / axial input from gamepad thumbstick

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill