getPose.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. return {
  2. tag = 'listener',
  3. summary = 'Get the pose of the listener.',
  4. description = 'Returns the position and orientation of the virtual audio listener.',
  5. arguments = {},
  6. returns = {
  7. {
  8. name = 'x',
  9. type = 'number',
  10. description = 'The x position of the listener, in meters.'
  11. },
  12. {
  13. name = 'y',
  14. type = 'number',
  15. description = 'The y position of the listener, in meters.'
  16. },
  17. {
  18. name = 'z',
  19. type = 'number',
  20. description = 'The z position of the listener, in meters.'
  21. },
  22. {
  23. name = 'angle',
  24. type = 'number',
  25. description = 'The number of radians the listener is rotated around its axis of rotation.'
  26. },
  27. {
  28. name = 'ax',
  29. type = 'number',
  30. description = 'The x component of the axis of rotation.'
  31. },
  32. {
  33. name = 'ay',
  34. type = 'number',
  35. description = 'The y component of the axis of rotation.'
  36. },
  37. {
  38. name = 'az',
  39. type = 'number',
  40. description = 'The z component of the axis of rotation.'
  41. }
  42. },
  43. related = {
  44. 'lovr.audio.getPosition',
  45. 'lovr.audio.getOrientation',
  46. 'Source:getPose'
  47. }
  48. }