C4 Engine Terathon Software C4 Engine API Documentation

• Sound Manager

API Links
Developer Links

Sound::SetVelocity

Defined in:  C4Sound.h
Sets a sound's 3D velocity.
Prototype

void SetVelocity(const Vector3D& velocity);

Parameters
velocity The 3D velocity, in units of meters per second.
Description
The SetVelocity function sets the world-space velocity of the sound to the vector given by the velocity parameter. The velocity is measured in units of meters per second. The listener's velocity is subtracted from the sound's velocity in order to calculate the Doppler effect.
See Also

Sound::GetVelocity

SoundMgr::GetListenerVelocity

SoundMgr::SetListenerVelocity