版本

menu_open
Wwise SDK 2018.1.11

◆ SetPosition()

AKRESULT __cdecl AK::SpatialAudio::SetPosition ( AkGameObjectID  in_gameObjectID,
const AkTransform in_sourcePosition 
)

Set the position of an emitter game object that has been registered with the SpatialAudio API.

This function should be called instead of AK::SoundEngine::SetPosition(). The argument in_sourcePosition should represent the real position of the emitter. It is this position that is used for all spatial audio services, such as Rooms and GeometrySets (see SpatialAudio::SetRoom and SpatialAudio::SetGeometry). When an emitter is in a different room from the listener, its virtual positions are automatically calculated based on the relative positions of the listener and nearby portals, and it is these virtual positions that are passed to the sound engine and used to render audio. If the game object is registered with the sound engine, but not with the SpatialAudio API, then the call will be passed on to AK::SoundEngine::SetPosition().

参数
in_gameObjectID Game object ID of the sound emitter.
in_sourcePosition Physical position of the emitter in the simulation.

此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅