Flafla2 / Unity-Wiimote

An easy to use interface between Unity3D / C# and a Wii Remote controller.
MIT License
329 stars 73 forks source link

Guitar Hero Controller API #14

Closed armsnyder closed 8 years ago

armsnyder commented 8 years ago

Full support for Guitar Hero guitar controller

Flafla2 commented 8 years ago

I'm excited for this! Will take a look over the next couple of days. A cursory look at the code suggests that this is likely to get committed (it fits in with the current design, is well commented, etc). I have access to two guitar controllers (one GH3, one GH World Tour) so I will check with both to make sure it works.

armsnyder commented 8 years ago

Thanks for the response! I wasn't sure if you were still managing the project. I tested it with GH3 and GHWT controllers. Let me know if you disagree with my design, especially regarding creating macro properties for strum_up || strum_down, green_fret || green_slider, etc, and using (-1, 1) as the range of GetStick01().

Flafla2 commented 8 years ago

Just tested it with my 2 controllers - both worked. I agree with your decision to use macro properties (they are convenient for most common use cases). However I would change GetStick01() to the range 0 - 1. I did this originally to encourage the use of custom deadzones and calibrated zero points. Using the range -1 to 1 implies that there is a 100% consistent zero point between all joysticks, which isn't actually true from my tests (at least on the nunchuck and classic controller). The Guitar Hero controllers might be different, but for consistency across all WiimoteData subclasses I would leave the range at 0 - 1.

Also, are there any other guitar-type controllers that use the Wiimote extension port for communication? I know the rock band controllers use a standard USB HID interface (so we couldn't support it). I bring this up because in the code things are named GuitarData, ExtensionController.GUITAR etc. It might be necessary (I'm not sure though 100%) to rename these to GuitarHeroData, ExtensionController.GUITARHERO etc. However I would agree with the current names if and only if the Guitar Hero controller is the only type we plan on supporting.

armsnyder commented 8 years ago

From my research, there are no other guitar controllers that use the extension port. I also doubt guitar rhythm games will make any sort of comeback in the near future, so leaving it as the generic "GUITAR" ought to be fine, yes?

You're absolutely correct that the zero points differ by controller. I would perhaps argue that (-1, 1) has the benefit of allowing things like abs(GetStick01()) > 0.2 to filter input, but I'll certainly change it for consistency.

Flafla2 commented 8 years ago

Sounds good, merged