class_xrorigin3d.rst 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XROrigin3D.xml.
  6. .. _class_XROrigin3D:
  7. XROrigin3D
  8. ==========
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. The origin point in AR/VR.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. Multiple origin points can be added to the scene tree, but only one can used at a time. All the :ref:`XRCamera3D<class_XRCamera3D>`, :ref:`XRController3D<class_XRController3D>`, and :ref:`XRAnchor3D<class_XRAnchor3D>` nodes should be direct children of this node for spatial tracking to work correctly.
  16. It is the position of this node that you update when your 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.
  17. For example, if your character is driving a car, the **XROrigin3D** node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node.
  18. .. rst-class:: classref-introduction-group
  19. Tutorials
  20. ---------
  21. - :doc:`XR documentation index <../tutorials/xr/index>`
  22. .. rst-class:: classref-reftable-group
  23. Properties
  24. ----------
  25. .. table::
  26. :widths: auto
  27. +---------------------------+-----------------------------------------------------------+-----------+
  28. | :ref:`bool<class_bool>` | :ref:`current<class_XROrigin3D_property_current>` | ``false`` |
  29. +---------------------------+-----------------------------------------------------------+-----------+
  30. | :ref:`float<class_float>` | :ref:`world_scale<class_XROrigin3D_property_world_scale>` | ``1.0`` |
  31. +---------------------------+-----------------------------------------------------------+-----------+
  32. .. rst-class:: classref-section-separator
  33. ----
  34. .. rst-class:: classref-descriptions-group
  35. Property Descriptions
  36. ---------------------
  37. .. _class_XROrigin3D_property_current:
  38. .. rst-class:: classref-property
  39. :ref:`bool<class_bool>` **current** = ``false`` :ref:`🔗<class_XROrigin3D_property_current>`
  40. .. rst-class:: classref-property-setget
  41. - |void| **set_current**\ (\ value\: :ref:`bool<class_bool>`\ )
  42. - :ref:`bool<class_bool>` **is_current**\ (\ )
  43. If ``true``, this origin node is currently being used by the :ref:`XRServer<class_XRServer>`. Only one origin point can be used at a time.
  44. .. rst-class:: classref-item-separator
  45. ----
  46. .. _class_XROrigin3D_property_world_scale:
  47. .. rst-class:: classref-property
  48. :ref:`float<class_float>` **world_scale** = ``1.0`` :ref:`🔗<class_XROrigin3D_property_world_scale>`
  49. .. rst-class:: classref-property-setget
  50. - |void| **set_world_scale**\ (\ value\: :ref:`float<class_float>`\ )
  51. - :ref:`float<class_float>` **get_world_scale**\ (\ )
  52. The scale of the game world compared to the real world. This is the same as :ref:`XRServer.world_scale<class_XRServer_property_world_scale>`. By default, most AR/VR platforms assume that 1 game unit corresponds to 1 real world meter.
  53. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  54. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  55. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  56. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  57. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  58. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  59. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  60. .. |void| replace:: :abbr:`void (No return value.)`