setPosition.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. return {
  2. tag = 'listener',
  3. summary = 'Set the position of the listener.',
  4. description = [[
  5. Sets the position of the virtual audio listener. The position doesn't have any specific units,
  6. but usually they can be thought of as meters, to match the headset module.
  7. ]],
  8. arguments = {
  9. x = {
  10. type = 'number',
  11. description = 'The x position of the listener.'
  12. },
  13. y = {
  14. type = 'number',
  15. description = 'The y position of the listener.'
  16. },
  17. z = {
  18. type = 'number',
  19. description = 'The z position of the listener.'
  20. },
  21. position = {
  22. type = 'Vec3',
  23. description = 'The listener position.'
  24. }
  25. },
  26. returns = {},
  27. variants = {
  28. {
  29. description = 'Set the listener position using numbers.',
  30. arguments = { 'x', 'y', 'z' },
  31. returns = {}
  32. },
  33. {
  34. description = 'Set the listener position using a vector.',
  35. arguments = { 'position' },
  36. returns = {}
  37. }
  38. },
  39. related = {
  40. 'lovr.audio.setOrientation',
  41. 'lovr.audio.setPose',
  42. 'Source:setPosition'
  43. }
  44. }