getHands.lua 617 B

1234567891011121314151617181920212223
  1. return {
  2. tag = 'input',
  3. summary = 'Get a list of currently tracked hand devices.',
  4. description = 'Returns a table with all of the currently tracked hand devices.',
  5. arguments = {},
  6. returns = {
  7. {
  8. name = 'hands',
  9. type = 'table',
  10. arguments = {},
  11. returns = {},
  12. description = 'The currently tracked hand devices.'
  13. }
  14. },
  15. notes = 'The hand paths will *always* be either `hand/left` or `hand/right`.',
  16. example = [[
  17. function lovr.update(dt)
  18. for i, hand in ipairs(lovr.headset.getHands()) do
  19. print(hand, lovr.headset.getPose(hand))
  20. end
  21. end
  22. ]]
  23. }