版本
menu_open

Motion Tips and Best Practices

Before creating the motion for your game, you may want to review the following sections, which provide you with a series of examples, tips, and best practices that can help you better manage the motion in Wwise.

Performance

If you have the time, you should create and integrate motion into your game using motion FX objects instead of generating it directly from your existing sounds because it can save on processing power because the motion data uses fewer samples and doesn't need to be filtered and re-sampled at run-time.

Motion Devices

  • Game controllers have limited playback capability. Game controllers can play back only a limited range of motion effects, making it difficult for a game player to distinguish between different types of motion effects especially when several effects are played back simultaneously. It is a good idea, therefore, to try to limit the playback to one motion source at a time.

  • Connect game controllers to high power USB ports. If your motion objects are not playing back on a game controller, make sure that the game controller is connected to a high power USB port. If the USB port does not have sufficient power to run the motion device, the system unmounts the device to protect the operating system or the device itself. The USB ports in the front of a computer are generally not powerful enough to run a motion device, so you should connect them to the USB ports at the back of the computer.

Game Controllers

There may be situations where you want the duration of the motion generated by the small and large motors of the Xbox 360 or PlayStation 3 controllers to be different. Since the same duration controls in the Wwise Motion Generator plug-in are applied to all curves, this type of motion effect can't be created using one source. To work around this limitation, you can do the following:

  • Create 2 motion FX objects, each with a Wwise Motion Generator as a source.

  • For one motion FX object, generate the curve for the large motor, define the duration for this curve, and then make the small motor curve flat at 0.

  • For the other motion FX object, generate the curve for the small motor, define the duration for this curve, and then make the large motor curve flat at 0.

  • Trigger both motion FX objects using the same event.

When playing back the event in Wwise, you can also use the PF exclusion option in the Event Editor as a solo/mute button.

Troubleshooting Motion

If the motion created in Wwise is not playing on a particular motion device, you can troubleshoot the problem using the Profiler. To capture motion data in the Advanced Profiler, do the following:

  • Press F6 to switch to the Profiler layout.

  • From the menu bar, click Project > Profiler Settings.

  • Select the Motion Data option and click OK.

    The Motion Devices tab is added to the Advanced Profiler.

Now you can connect to your game and profile the motion to identify the potential problem. The “Motion Devices” tab contains two separate lists: one for Devices and one for Game Objects. The Devices list indicates which motion devices have been properly registered and initialized in the sound engine, for each player.

To troubleshoot the problem, first check to see if the motion devices have been properly initialized, by doing the following:

  • Verify that each motion device is displayed in the Device list. If the device doesn't show up in this list, then the call to AK::MotionEngine::RegisterMotionDevice failed.

If the motion device appears in the list, then check to see if the motion device has been associated with a particular player, by doing the following:

  • Verify that there is a check mark matching up the device to the appropriate player. If there is no check mark for a particular player, then either of the following may be true:

    • The call to AK::MotionEngine::AddPlayerMotionDevice failed.

    • AK::MotionEngine::RemovePlayerMotionDevice was called.

If the motion devices have been properly initialized and they are associated to the appropriate player, then you can check the Game Objects list to verify if the game objects are setup properly to send motion data to a specific player. If there is no check mark for a particular combination of game object/player, you can switch to the Listener tab of the Advanced Profiler to check the following:

  • In the Listener list, find the player number that is not receiving the motion data in the Players column and then check to see which listener the player is using to receive the motion data. If the player is not using the correct listener, verify your calls to AK::MotionEngine::SetPlayerListener.

  • If the player is using the right listener, then make sure that the listener to which the player is attached has a check mark in the Motion column. If not, verify that you are calling AK::SoundEngine::SetListenerPipeline properly.

  • If a check mark is displayed, check the Game Object list to verify that the listener used by the player is enabled for the game object on which the Motion FX is playing. If the listener is not enabled for the game object, verify your calls to AK::SoundEngine::SetActiveListeners.


此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅