This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Sets the position, velocity, and orientation of the listener (ie. the player).
Syntax
n = TBASS_Set3DPosition(Pos, Vel, Front, Top)
Returns
Number
If successful, then %TBASS_TRUE is returned, else %TBASS_FALSE is returned. Use TBASS_ErrorGetCode to get the error code.
Parameters
Name |
Type |
Optional |
Meaning |
Pos |
ptrStruct |
No |
The position of the listener NULL = leave current. |
Vel |
ptrStruct |
No |
The listener's velocity in units (as set with TBASS_Set3DFactors) per second NULL = leave current. This is only used to calculate the doppler effects, and in no way affects the listener's position. |
Front |
ptrStruct |
No |
The direction that the listener's front is pointing NULL = leave current. This is automatically normalized. |
Top |
ptrStruct |
No |
The 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. |
Remarks
Attention: all parameters in this function are pointer to a UDT with the following structure:
Type TBASS_3DVECTOR
X As Single
Y As Single
Z As Single
End Type
Use VARPTR to pass a pointer to a variable structure with the above structure.
The front and top parameters must both be set in a single call, they can not be set individually.
As with all 3D functions, use TBASS_Apply3D to apply the changes.
Restrictions
See also
Examples