#include <nw/snd/snd_Sound3DActor.h>
void SetPosition(
const nw::math::VEC3 & position
);
| Name | Description | |
|---|---|---|
| in | position | Actor position coordinates. |
This function sets actor position information.
It sets the position information for 3D sound actors. The set coordinates are used to calculate 3D sound parameters.
When new position information is set, the difference between it and the previously set position information is calculated, and the 3D sound actor's velocity is automatically set. The actor's velocity is reflected in pitch changes, in accordance with the Doppler effect. The velocity can also be set explicitly by nw::snd::Sound3DActor::SetVelocity.
If the coordinates jump to a different position, the distance traversed will be used to calculate velocity. This causes a kind of processing that applies to movement at extremely high speed, resulting in sudden pitch changes. Note that in such cases, you must call nw::snd::Sound3DActor::SetVelocity after calling this function, and explicitly set the velocity.
CONFIDENTIAL