Version

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().

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

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise