185 lines
6.8 KiB
ReStructuredText
185 lines
6.8 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.6/modules/mobile_vr/doc_classes/MobileVRInterface.xml.
|
|
|
|
.. _class_MobileVRInterface:
|
|
|
|
MobileVRInterface
|
|
=================
|
|
|
|
**Inherits:** :ref:`ARVRInterface<class_ARVRInterface>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
Generic mobile VR implementation.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Description
|
|
-----------
|
|
|
|
This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect, you need a mobile phone with a gyroscope and accelerometer.
|
|
|
|
Note that even though there is no positional tracking, the camera will assume the headset is at a height of 1.85 meters. You can change this by setting :ref:`eye_height<class_MobileVRInterface_property_eye_height>`.
|
|
|
|
You can initialise this interface as follows:
|
|
|
|
::
|
|
|
|
var interface = ARVRServer.find_interface("Native mobile")
|
|
if interface and interface.initialize():
|
|
get_viewport().arvr = true
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Properties
|
|
----------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------+--------------------------------------------------------------------------+-----------+
|
|
| :ref:`float<class_float>` | :ref:`display_to_lens<class_MobileVRInterface_property_display_to_lens>` | ``4.0`` |
|
|
+---------------------------+--------------------------------------------------------------------------+-----------+
|
|
| :ref:`float<class_float>` | :ref:`display_width<class_MobileVRInterface_property_display_width>` | ``14.5`` |
|
|
+---------------------------+--------------------------------------------------------------------------+-----------+
|
|
| :ref:`float<class_float>` | :ref:`eye_height<class_MobileVRInterface_property_eye_height>` | ``1.85`` |
|
|
+---------------------------+--------------------------------------------------------------------------+-----------+
|
|
| :ref:`float<class_float>` | :ref:`iod<class_MobileVRInterface_property_iod>` | ``6.0`` |
|
|
+---------------------------+--------------------------------------------------------------------------+-----------+
|
|
| :ref:`float<class_float>` | :ref:`k1<class_MobileVRInterface_property_k1>` | ``0.215`` |
|
|
+---------------------------+--------------------------------------------------------------------------+-----------+
|
|
| :ref:`float<class_float>` | :ref:`k2<class_MobileVRInterface_property_k2>` | ``0.215`` |
|
|
+---------------------------+--------------------------------------------------------------------------+-----------+
|
|
| :ref:`float<class_float>` | :ref:`oversample<class_MobileVRInterface_property_oversample>` | ``1.5`` |
|
|
+---------------------------+--------------------------------------------------------------------------+-----------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_MobileVRInterface_property_display_to_lens:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **display_to_lens** = ``4.0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_display_to_lens** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_display_to_lens** **(** **)**
|
|
|
|
The distance between the display and the lenses inside of the device in centimeters.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_MobileVRInterface_property_display_width:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **display_width** = ``14.5``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_display_width** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_display_width** **(** **)**
|
|
|
|
The width of the display in centimeters.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_MobileVRInterface_property_eye_height:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **eye_height** = ``1.85``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_eye_height** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_eye_height** **(** **)**
|
|
|
|
The height at which the camera is placed in relation to the ground (i.e. :ref:`ARVROrigin<class_ARVROrigin>` node).
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_MobileVRInterface_property_iod:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **iod** = ``6.0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_iod** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_iod** **(** **)**
|
|
|
|
The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_MobileVRInterface_property_k1:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **k1** = ``0.215``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_k1** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_k1** **(** **)**
|
|
|
|
The k1 lens factor is one of the two constants that define the strength of the lens used and directly influences the lens distortion effect.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_MobileVRInterface_property_k2:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **k2** = ``0.215``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_k2** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_k2** **(** **)**
|
|
|
|
The k2 lens factor, see k1.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_MobileVRInterface_property_oversample:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **oversample** = ``1.5``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_oversample** **(** :ref:`float<class_float>` value **)**
|
|
- :ref:`float<class_float>` **get_oversample** **(** **)**
|
|
|
|
The oversample setting. Because of the lens distortion we have to render our buffers at a higher resolution then the screen can natively handle. A value between 1.5 and 2.0 often provides good results but at the cost of performance.
|
|
|
|
.. |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.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|