getVelocity.lua 890 B

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