recenter.lua 1.1 KB

1234567891011121314151617181920212223242526
  1. return {
  2. tag = 'callbacks',
  3. summary = 'Called when the user recenters the coordinate space.',
  4. description = [[
  5. The `lovr.recenter` callback is called whenever the user performs a "recenter" gesture to
  6. realign the virtual coordinate space. On most VR systems this will move the origin to the
  7. user's current position and rotate its yaw to match the view direction. The y=0 position will
  8. always be on the floor or at eye level, depending on whether `t.headset.seated` was set in
  9. `lovr.conf`.
  10. ]],
  11. arguments = {},
  12. returns = {},
  13. notes = [[
  14. Note that the pose of the `floor` device will not always be at the origin of the coordinate
  15. space. It uses a fixed position on the floor in the real world, usually the center of the
  16. configured play area. This allows virtual objects to be positioned in a room without having
  17. them jump around after a recenter.
  18. ]],
  19. related = {
  20. 'lovr.headset.getBoundsWidth',
  21. 'lovr.headset.getBoundsDepth',
  22. 'lovr.headset.getBoundsDimensions',
  23. 'lovr.headset.getBoundsGeometry',
  24. 'lovr.headset.isSeated'
  25. }
  26. }