Channel::set3DAttributes

FMOD Studio API

Firelight Technologies FMOD Studio API

Channel::set3DAttributes

Sets the position and velocity used to apply panning, attenuation and doppler.

C++ Syntax

FMOD_RESULT Channel::set3DAttributes(
  const FMOD_VECTOR *pos,
  const FMOD_VECTOR *vel,
  const FMOD_VECTOR *alt_pan_pos
);

C Syntax

FMOD_RESULT FMOD_Channel_Set3DAttributes(
  FMOD_CHANNEL *channel,
  const FMOD_VECTOR *pos,
  const FMOD_VECTOR *vel,
  const FMOD_VECTOR *alt_pan_pos
);

C# Syntax

RESULT Channel.set3DAttributes(
  ref VECTOR pos,
  ref VECTOR vel,
  ref VECTOR alt_pan_pos
);

JavaScript Syntax

Channel.set3DAttributes(
  pos,                             
  vel,                             
  alt_pan_pos                      
);

Parameters

pos
Position in 3D space used for panning and attenuation. Optional, specify 0 or NULL to ignore.
vel
Velocity in 'distance units per second' (see remarks) in 3D space. Optional, specify 0 or NULL to ignore.
alt_pan_pos
(Unimplemented).

Return Values

If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.

Remarks

A 'distance unit' is specified by System::set3DSettings. By default this is set to meters which is a distance scale of 1.0.

For a stereo 3D sound, you can set the spread of the left/right parts in speaker space by using ChannelControl::set3DSpread.

Vectors should use your chosen coordinate system, see 3D sounds for more information.

See Also




Version 1.10.03 Built on Feb 1, 2018