getHands.lua 685 B

12345678910111213141516171819202122232425262728
  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. hands = {
  8. type = 'table',
  9. arguments = {},
  10. returns = {},
  11. description = 'The currently tracked hand devices.'
  12. }
  13. },
  14. variants = {
  15. {
  16. arguments = {},
  17. returns = { 'hands' }
  18. }
  19. },
  20. notes = 'The hand paths will *always* be either `hand/left` or `hand/right`.',
  21. example = [[
  22. function lovr.update(dt)
  23. for i, hand in ipairs(lovr.headset.getHands()) do
  24. print(hand, lovr.headset.getPose(hand))
  25. end
  26. end
  27. ]]
  28. }