class_xrorigin3d.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. There should be only one of these nodes in your scene and you must have one. All the XRCamera3D, XRController3D and 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``
  40. .. rst-class:: classref-property-setget
  41. - void **set_current** **(** :ref:`bool<class_bool>` value **)**
  42. - :ref:`bool<class_bool>` **is_current** **(** **)**
  43. Is this XROrigin3D node the current origin used by the :ref:`XRServer<class_XRServer>`?
  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``
  49. .. rst-class:: classref-property-setget
  50. - void **set_world_scale** **(** :ref:`float<class_float>` value **)**
  51. - :ref:`float<class_float>` **get_world_scale** **(** **)**
  52. Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter.
  53. \ **Note:** This method is a passthrough to the :ref:`XRServer<class_XRServer>` itself.
  54. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  55. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  56. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  57. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  58. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  59. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  60. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`