getPose.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. x = {
  8. type = 'number',
  9. description = 'The x position of the listener, in meters.'
  10. },
  11. y = {
  12. type = 'number',
  13. description = 'The y position of the listener, in meters.'
  14. },
  15. z = {
  16. type = 'number',
  17. description = 'The z position of the listener, in meters.'
  18. },
  19. angle = {
  20. type = 'number',
  21. description = 'The number of radians the listener is rotated around its axis of rotation.'
  22. },
  23. ax = {
  24. type = 'number',
  25. description = 'The x component of the axis of rotation.'
  26. },
  27. ay = {
  28. type = 'number',
  29. description = 'The y component of the axis of rotation.'
  30. },
  31. az = {
  32. type = 'number',
  33. description = 'The z component of the axis of rotation.'
  34. }
  35. },
  36. variants = {
  37. {
  38. arguments = {},
  39. returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
  40. }
  41. },
  42. related = {
  43. 'lovr.audio.getPosition',
  44. 'lovr.audio.getOrientation',
  45. 'Source:getPose'
  46. }
  47. }