Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
MobileVRInterface
繼承: XRInterface < RefCounted < Object
通用移動 VR 實作。
說明
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 initialize this interface as follows:
var interface = XRServer.find_interface("Native mobile")
if interface and interface.initialize():
get_viewport().use_xr = true
Note: For Android, ProjectSettings.input_devices/sensors/enable_accelerometer, ProjectSettings.input_devices/sensors/enable_gravity, ProjectSettings.input_devices/sensors/enable_gyroscope and ProjectSettings.input_devices/sensors/enable_magnetometer must be enabled.
屬性
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
xr_play_area_mode |
|
屬性說明
顯示器與裝置內部鏡片之間的距離,單位為釐米。
顯示器的寬度,單位為釐米。
相機相對於地面所處的高度(即相對於 XROrigin3D 節點)。
眼間距離,也稱為瞳孔間距離。左眼和右眼瞳孔之間的距離。
k1 鏡頭因數是定義所使用鏡頭強度的兩個常數之一,並直接影響鏡頭失真效果。
k2 鏡頭因數,見 k1。
Rect2 offset_rect = Rect2(0, 0, 1, 1) 🔗
Set the offset rect relative to the area being rendered. A length of 1 represents the whole rendering area on that axis.
過取樣設定。由於鏡頭失真,我們必須以比螢幕自然解析度更高的品質算繪我們的緩衝區。介於 1.5 和 2.0 之間的值通常可以提供良好的結果,但會犧牲性能。
The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size.
Note: Mobile and Forward+ renderers only. Requires Viewport.vrs_mode to be set to Viewport.VRS_XR.
The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. This improves performance at the cost of quality.
Note: Mobile and Forward+ renderers only. Requires Viewport.vrs_mode to be set to Viewport.VRS_XR.