Version

menu_open
Attention : vous avez été redirigé vers la plus récente documentation correspondant à votre version générale ( 2023.1.3.8471 ). Si vous souhaitez accéder à la documentation de votre version précise, veuillez télécharger la documentation hors ligne depuis l'Audiokinetic Launcher et sélectionner l'option de documentation Offline dans l'application de création Wwise.
Wwise SDK 2023.1.3

◆ SetGameObjectRadius()

AKSOUNDENGINE_API AKRESULT AK::SpatialAudio::SetGameObjectRadius ( AkGameObjectID  in_gameObjectID,
AkReal32  in_outerRadius,
AkReal32  in_innerRadius 
)

Define an inner and outer radius around each sound position for a specified game object. If the radii are set to 0, the game object is a point source. Non-zero radii create a Radial Emitter. The radii are used in spread and distance calculations that simulates sound emitting from a spherical volume of space. When applying attenuation curves, the distance between the listener and the inner sphere (defined by the sound position and in_innerRadius) is used. The spread for each sound position is calculated as follows:

  • If the listener is outside the outer radius, the spread is defined by the area that the sphere occupies in the listener field of view. Specifically, this angle is calculated as 2.0*asinf( in_outerRadius / distance ), where distance is the distance between the listener and the sound position.
  • When the listener intersects the outer radius (the listener is exactly in_outerRadius units away from the sound position), the spread is exactly 50%.
  • When the listener is between the inner and outer radii, the spread interpolates linearly from 50% to 100% as the listener transitions from the outer radius towards the inner radius.
  • If the listener is inside the inner radius, the spread is 100%.
    Note: Transmission and diffraction calculations in Spatial Audio always use the center of the sphere (the position(s) passed into AK::SoundEngine::SetPosition or AK::SoundEngine::SetMultiplePositions) for raycasting. To obtain accurate diffraction and transmission calculations for radial sources, where different parts of the volume may take different paths through or around geometry, it is necessary to pass multiple sound positions into AK::SoundEngine::SetMultiplePositions to allow the engine to 'sample' the area at different points.
  • AK::SoundEngine::SetPosition
  • AK::SoundEngine::SetMultiplePositions
Parameters
in_gameObjectIDGame object ID
in_outerRadiusOuter radius around each sound position, defining 50% spread. Must satisfy in_innerRadius <= in outerRadius.
in_innerRadiusInner radius around each sound position, defining 100% spread and 0 attenuation distance. Must satisfy in_innerRadius <= in outerRadius.

Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise