setPosition.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. return {
  2. tag = 'sourceEffects',
  3. summary = 'Set the position of the Source.',
  4. description = [[
  5. Sets the position of the Source. Setting the position will cause the Source to be distorted and
  6. attenuated based on its position relative to the listener.
  7. Only mono sources can be positioned. Setting the position of a stereo Source will cause an
  8. error.
  9. ]],
  10. arguments = {
  11. x = {
  12. type = 'number',
  13. description = 'The x coordinate of the position.'
  14. },
  15. y = {
  16. type = 'number',
  17. description = 'The y coordinate of the position.'
  18. },
  19. z = {
  20. type = 'number',
  21. description = 'The z coordinate of the position.'
  22. },
  23. position = {
  24. type = 'Vec3',
  25. description = 'The position.'
  26. }
  27. },
  28. returns = {},
  29. variants = {
  30. {
  31. description = 'Set the position using numbers.',
  32. arguments = { 'x', 'y', 'z' },
  33. returns = {}
  34. },
  35. {
  36. description = 'Set the position using a vector.',
  37. arguments = { 'position' },
  38. returns = {}
  39. }
  40. },
  41. notes = 'The position doesn\'t have any defined units, but meters are used by convention.',
  42. related = {
  43. 'Source:setOrientation',
  44. 'Source:setPose'
  45. }
  46. }