ARVROrigin.xml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ARVROrigin" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Our origin point in AR/VR.
  5. </brief_description>
  6. <description>
  7. This is a special node within the AR/VR system that maps the physical location of the center of our tracking space to the virtual location within our game world.
  8. There should be only one of these nodes in your scene and you must have one. All the ARVRCamera, ARVRController and ARVRAnchor nodes should be direct children of this node for spatial tracking to work correctly.
  9. It is the position of this node that you update when you're character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point.
  10. So say that your character is driving a car, the ARVROrigin node should be a child node of this car. If you implement a teleport system to move your character, you change the position of this node. Etc.
  11. </description>
  12. <tutorials>
  13. </tutorials>
  14. <demos>
  15. </demos>
  16. <methods>
  17. <method name="get_world_scale" qualifiers="const">
  18. <return type="float">
  19. </return>
  20. <description>
  21. Get the world scale applied to our positioning.
  22. </description>
  23. </method>
  24. <method name="set_world_scale">
  25. <return type="void">
  26. </return>
  27. <argument index="0" name="world_scale" type="float">
  28. </argument>
  29. <description>
  30. Changes the world scaling factor.
  31. Most AR/VR platforms will assume a unit size of 1 unit in your game world = 1 meter in the real world. This scale allows you to adjust this to the unit system you use in your game.
  32. Note that this method is a passthrough to the ARVRServer itself.
  33. </description>
  34. </method>
  35. </methods>
  36. <members>
  37. <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale">
  38. Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world.
  39. Note that this method is a passthrough to the [ARVRServer] itself.
  40. </member>
  41. </members>
  42. <constants>
  43. </constants>
  44. </class>