Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

How to get the right player index for an XInputController in Unity?

0 votes

Hello,

I'm trying to integrate motion in a Unity game using WWise and I can't figure out where to find the "player index between 0 to 3" to identify which controller to setup using AK::SoundEngine::AddOutput. Where do I get this information?

 

Thank you,

Louis-André

 

PS: I use this page as reference: https://www.audiokinetic.com/library/edge/?source=SDK&id=integrating_elements_motion.html

asked Aug 4, 2021 in General Discussion by Louis-André G. (100 points)

1 Answer

0 votes

Hi there, looking at the link you referenced there's this line:

To simplify the setup when using a single controller, a default device ID is supported. By using "0", the Motion sink will target the first connected device that supports motion.

So as in the example provided for a single controller, you should just be able to pass in 0 and Wwise will associate it with the first connected controller. 

That link also refers to this method if you need to find another device ID: https://www.audiokinetic.com/library/edge/?source=SDK&id=namespace_a_k_1_1_sound_engine_aed62774067dccb22babc5ca54619ecb0.html#aed62774067dccb22babc5ca54619ecb0

answered Aug 6, 2021 by Mike P. (200 points)
...