getOrientation.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. return {
  2. tag = 'input',
  3. summary = 'Get the orientation of a device.',
  4. description = 'Returns the current orientation of a device, in angle/axis form.',
  5. arguments = {
  6. {
  7. name = 'device',
  8. type = 'Device',
  9. default = [['head']],
  10. description = 'The device to get the orientation of.'
  11. }
  12. },
  13. returns = {
  14. {
  15. name = 'angle',
  16. type = 'number',
  17. description = 'The amount of rotation around the axis of rotation, in radians.'
  18. },
  19. {
  20. name = 'ax',
  21. type = 'number',
  22. description = 'The x component of the axis of rotation.'
  23. },
  24. {
  25. name = 'ay',
  26. type = 'number',
  27. description = 'The y component of the axis of rotation.'
  28. },
  29. {
  30. name = 'az',
  31. type = 'number',
  32. description = 'The z component of the axis of rotation.'
  33. }
  34. },
  35. notes = ' If the device isn\'t tracked, all zeroes will be returned.',
  36. related = {
  37. 'lovr.headset.getPose',
  38. 'lovr.headset.getPosition',
  39. 'lovr.headset.getVelocity',
  40. 'lovr.headset.getAngularVelocity',
  41. 'lovr.headset.isTracked',
  42. 'lovr.headset.getDriver'
  43. }
  44. }