getPosition.lua 748 B

12345678910111213141516171819202122232425262728293031323334
  1. return {
  2. tag = 'sourceEffects',
  3. summary = 'Get the position of the Source.',
  4. description = [[
  5. Returns the position of the Source, in meters. Setting the position will cause the Source to
  6. be distorted and attenuated based on its position relative to the listener.
  7. ]],
  8. arguments = {},
  9. returns = {
  10. x = {
  11. type = 'number',
  12. description = 'The x coordinate.'
  13. },
  14. y = {
  15. type = 'number',
  16. description = 'The y coordinate.'
  17. },
  18. z = {
  19. type = 'number',
  20. description = 'The z coordinate.'
  21. }
  22. },
  23. variants = {
  24. {
  25. arguments = {},
  26. returns = { 'x', 'y', 'z' }
  27. }
  28. },
  29. related = {
  30. 'Source:getOrientation',
  31. 'Source:getPose',
  32. 'lovr.audio.getPosition'
  33. }
  34. }