版本
menu

Wwise SDK 2025.1.0
AkCmd_SetMultiplePositions结构体 参考

#include <AkCommandTypes.h>

Public 属性

AkGameObjectID gameObjectID
 Game Object ID 更多...
 
AkUInt32 flags
 See AkSetPositionFlags 更多...
 
AkUInt32 multiPositionType
 See AkMultiPositionType 更多...
 
AkUInt32 numPositions
 Number of game positions 更多...
 

详细描述

Sets multiple positions to a single game object.

Setting multiple positions on a single game object is a way to simulate multiple emission sources while using the resources of only one voice. This can be used to simulate wall openings, area sounds, or multiple objects emitting the same sound in the same area.

备注:
  • Using this command with only one position is the same as using AkCommand_SetPosition.
  • If a sound has diffraction enabled, it is treated as AkMultiPositionType_MultiDirections. AkMultiPositionType_MultiSources is not supported in this case.

The Sound Engine expects an array of AkChannelEmitter objects after the command. For example:

auto cmd = (AkCmd_SetMultiplePositions*)AK_CommandBuffer_Add(buffer, AkCommand_SetMultiplePositions);
// Fill out the command...
cmd->numPositions = myPositions.size();
AK_CommandBuffer_AddArray(buffer, sizeof(AkChannelEmitter), myPositions.size(), myPositions.data());

This command can fail for the following reasons:

  • AK_InvalidParameter: gameObjectID is outside the valid range, or flags are invalid, no positions were added after the command, or at least one position in the array is invalid
  • AK_IDNotFound: gameObjectID is not a registered game object ID.
参见

在文件 AkCommandTypes.h297 行定义.


此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅