Source:setPosition

Edit

Sets the position of the Source. Setting the position will cause the Source to be spatialized based on its position relative to the listener.



Set the position using numbers.

Arguments

NameTypeDescription
xnumber The x coordinate of the position.
ynumber The y coordinate of the position.
znumber The z coordinate of the position.

Returns

Nothing

Set the position using a vector.

Arguments

NameTypeDescription
positionvector The position.

Returns

Nothing

Notes

The position doesn't have any defined units, but meters are used by convention.

Ambisonic sources ignore their position, because they are omnidirectional.

See also