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