Before trying to assign motion effects to a specific player in your game, you should first read the following two sections in the SDK:
- Integrating Wwise Motion
- Integrating Listeners
Both of these topics are located in the following section:
Sound Engine Integration Walkthrough > Integrate Wwise Elements into Your Game.
So now let's look at what's involved in assigning motion effects to specific players in your game. For this example, let's assume that your game has two players.
1. The first step is to register each player with a motion device using AddPlayerMotionDevice ().
2. After this is done, you need to enable a listener for each player so that they can receive audio and motion events. This is done by doing the following:
- Call SetPlayerListener () for each listener-player pair.
- Call SetListenerPipeline () for your two listeners.
3. The final step is to register each game object to the desired listener. Using SetActiveListener(), you can easily specify which listener/player will hear/feel each object.
Note: For game objects that should be heard and felt by both players, you can call SetActiveListeners() with both listeners set in the mask.