getAngularVelocity.lua 878 B

12345678910111213141516171819202122232425262728293031323334353637
  1. return {
  2. tag = 'input',
  3. summary = 'Get the angular velocity of a device.',
  4. description = 'Returns the current angular velocity of a device.',
  5. arguments = {
  6. device = {
  7. type = 'Device',
  8. default = [['head']],
  9. description = 'The device to get the velocity of.'
  10. }
  11. },
  12. returns = {
  13. x = {
  14. type = 'number',
  15. description = 'The x component of the angular velocity.'
  16. },
  17. y = {
  18. type = 'number',
  19. description = 'The y component of the angular velocity.'
  20. },
  21. z = {
  22. type = 'number',
  23. description = 'The z component of the angular velocity.'
  24. }
  25. },
  26. variants = {
  27. {
  28. arguments = { 'device' },
  29. returns = { 'x', 'y', 'z' }
  30. }
  31. },
  32. related = {
  33. 'lovr.headset.getVelocity',
  34. 'lovr.headset.getPosition',
  35. 'lovr.headset.getOrientation'
  36. }
  37. }