isTracked.lua 672 B

1234567891011121314151617181920212223242526
  1. return {
  2. tag = 'input',
  3. summary = 'Check if a device is currently tracked.',
  4. description = [[
  5. Returns whether any active headset driver is currently returning pose information for a device.
  6. ]],
  7. arguments = {
  8. {
  9. name = 'device',
  10. type = 'Device',
  11. default = [['head']],
  12. description = 'The device to get the pose of.'
  13. }
  14. },
  15. returns = {
  16. {
  17. name = 'tracked',
  18. type = 'boolean',
  19. description = 'Whether the device is currently tracked.'
  20. }
  21. },
  22. notes = [[
  23. If a device is tracked, it is guaranteed to return a valid pose until the next call to
  24. `lovr.headset.update`.
  25. ]]
  26. }