/Godot 3.2


Inherits: ARVRInterface < Reference < Object

Generic mobile VR implementation.


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 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


float display_to_lens 4.0
float display_width 14.5
float eye_height 1.85
float iod 6.0
float k1 0.215
float k2 0.215
float oversample 1.5

Property Descriptions

float display_to_lens

Default 4.0
Setter set_display_to_lens(value)
Getter get_display_to_lens()

The distance between the display and the lenses inside of the device in centimeters.

float display_width

Default 14.5
Setter set_display_width(value)
Getter get_display_width()

The width of the display in centimeters.

float eye_height

Default 1.85
Setter set_eye_height(value)
Getter get_eye_height()

The height at which the camera is placed in relation to the ground (i.e. ARVROrigin node).

float iod

Default 6.0
Setter set_iod(value)
Getter get_iod()

The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye.

float k1

Default 0.215
Setter set_k1(value)
Getter 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.

float k2

Default 0.215
Setter set_k2(value)
Getter get_k2()

The k2 lens factor, see k1.

float oversample

Default 1.5
Setter set_oversample(value)
Getter 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.

© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.