setPose.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. return {
  2. tag = 'sourceEffects',
  3. summary = 'Set the pose of the Source.',
  4. description = 'Sets the position and orientation of the Source.',
  5. arguments = {
  6. x = {
  7. type = 'number',
  8. description = 'The x position of the Source.'
  9. },
  10. y = {
  11. type = 'number',
  12. description = 'The y position of the Source.'
  13. },
  14. z = {
  15. type = 'number',
  16. description = 'The z position of the Source.'
  17. },
  18. angle = {
  19. type = 'number',
  20. description = 'The number of radians the Source is rotated around its axis of rotation.'
  21. },
  22. ax = {
  23. type = 'number',
  24. description = 'The x component of the axis of rotation.'
  25. },
  26. ay = {
  27. type = 'number',
  28. description = 'The y component of the axis of rotation.'
  29. },
  30. az = {
  31. type = 'number',
  32. description = 'The z component of the axis of rotation.'
  33. },
  34. position = {
  35. type = 'Vec3',
  36. description = 'The position.'
  37. },
  38. orientation = {
  39. type = 'Quat',
  40. description = 'The orientation.'
  41. }
  42. },
  43. returns = {},
  44. variants = {
  45. {
  46. description = 'Set the pose using numbers.',
  47. arguments = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' },
  48. returns = {}
  49. },
  50. {
  51. description = 'Set the pose using vector types.',
  52. arguments = { 'position', 'orientation' },
  53. returns = {}
  54. }
  55. },
  56. notes = 'The position doesn\'t have any defined units, but meters are used by convention.',
  57. related = {
  58. 'Source:setPosition',
  59. 'Source:setOrientation',
  60. 'lovr.audio.setPose'
  61. }
  62. }