123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XROrigin3D.xml.
- .. _class_XROrigin3D:
- XROrigin3D
- ==========
- **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- The origin point in AR/VR.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- 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.
- 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.
- 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.
- 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.
- .. rst-class:: classref-introduction-group
- Tutorials
- ---------
- - :doc:`XR documentation index <../tutorials/xr/index>`
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +---------------------------+-----------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`current<class_XROrigin3D_property_current>` | ``false`` |
- +---------------------------+-----------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`world_scale<class_XROrigin3D_property_world_scale>` | ``1.0`` |
- +---------------------------+-----------------------------------------------------------+-----------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_XROrigin3D_property_current:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **current** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_current** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **is_current** **(** **)**
- Is this XROrigin3D node the current origin used by the :ref:`XRServer<class_XRServer>`?
- .. rst-class:: classref-item-separator
- ----
- .. _class_XROrigin3D_property_world_scale:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **world_scale** = ``1.0``
- .. rst-class:: classref-property-setget
- - void **set_world_scale** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_world_scale** **(** **)**
- 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.
- \ **Note:** This method is a passthrough to the :ref:`XRServer<class_XRServer>` itself.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|