BASS_Set3DPosition

Sets the position, velocity, and orientation of the listener (ie. the player).

BOOL BASS_Set3DPosition(
    BASS_3DVECTOR *pos,
    BASS_3DVECTOR *vel,
    BASS_3DVECTOR *front,
    BASS_3DVECTOR *top
);

Parameters

posThe position of the listener... NULL = leave current.
velThe listener's velocity in units (as set with BASS_Set3DFactors) per second... NULL = leave current. This is only used to calculate the doppler effects, and in no way affects the listener's position.
frontThe direction that the listener's front is pointing... NULL = leave current. This is automatically normalized.
topThe direction that the listener's top is pointing... NULL = leave current. This is automatically normalized, and adjusted to be at a right-angle to the front vector if necessary.

Return value

If successful, then TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_INITBASS_Init has not been successfully called.
BASS_ERROR_NO3DThe device was not initialized with 3D support.

Remarks

The front and top parameters must both be set in a single call, they cannot be set individually. As with all 3D functions, use BASS_Apply3D to apply the changes.

When using multiple devices, the current thread's device setting (as set with BASS_SetDevice) determines which device this function call applies to.

See also

BASS_Apply3D, BASS_Get3DPosition, BASS_Set3DFactors, BASS_3DVECTOR structure