reckfellENGINE

MobileVRInterface

Phone stereo VR: lens parameters, assumed height and VRS.

On this page
class MobileVRInterfaceReckfellSharpInherits XRInterface

MobileVRInterface is a simple built-in stereo path for a phone in a holder. Its registered name is Native mobile. It uses sensor-based rotation and fixed EyeHeight, without positional room tracking. This is neither OpenXR/ARCore nor automatic integration with any headset.

Initialize registers head and selects primary, but current code returns true without a phone too. Two views and a head pose do not establish physical sensors either. One component should own startup; avoid replacing another provider’s primary/head and restore UseXR. Full executed helper and diagnosis: phone VR. Do not Dispose the borrowed FindInterface result; new MobileVRInterface creates a separate object without automatic registration.

EyeHeight uses meters before WorldScale; Iod, DisplayWidth and DisplayToLens use centimeters. Oversample changes target size and frustum; K1/K2 control distortion. Parameters do not automatically discover holder geometry or load QR profiles.

Set WorldScale before startup. After the first GetCameraOffsets, the current cache does not refresh for a live WorldScale change; old ±0.03 offsets were reproduced after switching 1→2. A controlled stop/start rebuilt ±0.06. The engine limitation was not fixed. Do not edit returned cached arrays as configuration.

Windows headless/SDK 1.0.0 checks covered parameters, helper lifecycle, primary/head ownership, UseXR restoration and numerical eye calculations. Phone hardware, GetTrackingStatus initialization, lenses/stereo pixels, VRS output, on-device C# export, comfort and performance were not tested. For OpenXR devices use XR startup.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

MobileVRInterfaceConstructor
# MobileVRInterface
C#
public MobileVRInterface();

Creates a separate uninitialized object with default parameters. Does not add it to XRServer, connect a phone or enable Viewport.UseXR. Use FindInterface("Native mobile") for the built-in registered interface; do not start competing head owners.

Properties10

DisplayToLensProperty
# DisplayToLens
C#
public double DisplayToLens { get; set; }

Display-to-lens distance in centimeters, initially 4.0. A divisor in frustum calculation: use a meaningful positive value. The setter stores it and clears projections on change; not automatic calibration.

DisplayWidthProperty
# DisplayWidth
C#
public double DisplayWidth { get; set; }

Physical display width in centimeters, initially 14.5. Used in frustum and lens-distortion layout; not a pixel count or window width. A change clears projection cache. The setter does not measure the device.

EyeHeightProperty
# EyeHeight
C#
public double EyeHeight { get; set; }

Assumed head height in meters before WorldScale, initially 1.85. Not measured by positional sensors. Process writes this fixed Y into the head pose; gameplay movement/origin are separate.

IodProperty
# Iod
C#
public double Iod { get; set; }

Interocular distance in centimeters, initially 6.0. Produces −0.03/+0.03 eye offsets at WorldScale=1. A changed value clears offsets and projections; repeating the same value does not reset caches. Do not supply meters.

K1Property
# K1
C#
public double K1 { get; set; }

First dimensionless lens-distortion coefficient, initially 0.215. Used with K2 during screen blit, not a gameplay-coordinate change. Match actual lenses; the interface loads no QR profile automatically.

K2Property
# K2
C#
public double K2 { get; set; }

Second dimensionless lens-distortion coefficient, initially 0.215. Works with K1; not AA strength or a quality preset. The setter stores the number without establishing suitable lens calibration.

OffsetRectProperty
# OffsetRect
C#
public Rect2 OffsetRect { get; set; }

Output region relative to the screen rect, initially Rect2(0,0,1,1) for its full area. Position and Size are scaled by screen-rect dimensions; not pixels or a tracking-origin offset. Does not make a SubViewport visible on screen by itself.

OversampleProperty
# Oversample
C#
public double Oversample { get; set; }

Rendering multiplier, initially 1.5. Per-eye target is half window width × multiplier and window height × multiplier; also affects frustum and distortion upscale. Not MSAA or guaranteed improvement. A change clears projection cache; choose a positive device-appropriate value.

VrsMinRadiusProperty
# VrsMinRadius
C#
public float VrsMinRadius { get; set; }

Minimum central full-density VRS region as a size percentage, initially 20. The setter clamps to 1–100 with an out-of-range warning. Requires an active XR VRS path; a stored value establishes neither map use nor image quality.

VrsStrengthProperty
# VrsStrength
C#
public float VrsStrength { get; set; }

VRS-map strength, initially 1. The setter clamps to 0.1–10 with an out-of-range warning. Larger values change the density/quality trade-off, not a promised FPS. Actual map output and performance were not tested here.

Methods20

GetDisplayToLensdouble
# GetDisplayToLens
C#
public double GetDisplayToLens();

Returns stored DisplayToLens, not a physical-device measurement. Display-to-lens distance in centimeters, initially 4.0. A divisor in frustum calculation: use a meaningful positive value. The setter stores it and clears projections on change; not automatic calibration.

Returns double

Stored DisplayToLens, not evidence of hardware or output quality.

GetDisplayWidthdouble
# GetDisplayWidth
C#
public double GetDisplayWidth();

Returns stored DisplayWidth, not a physical-device measurement. Physical display width in centimeters, initially 14.5. Used in frustum and lens-distortion layout; not a pixel count or window width. A change clears projection cache. The setter does not measure the device.

Returns double

Stored DisplayWidth, not evidence of hardware or output quality.

GetEyeHeightdouble
# GetEyeHeight
C#
public double GetEyeHeight();

Returns stored EyeHeight, not a physical-device measurement. Assumed head height in meters before WorldScale, initially 1.85. Not measured by positional sensors. Process writes this fixed Y into the head pose; gameplay movement/origin are separate.

Returns double

Stored EyeHeight, not evidence of hardware or output quality.

GetIoddouble
# GetIod
C#
public double GetIod();

Returns stored Iod, not a physical-device measurement. Interocular distance in centimeters, initially 6.0. Produces −0.03/+0.03 eye offsets at WorldScale=1. A changed value clears offsets and projections; repeating the same value does not reset caches. Do not supply meters.

Returns double

Stored Iod, not evidence of hardware or output quality.

GetK1double
# GetK1
C#
public double GetK1();

Returns stored K1, not a physical-device measurement. First dimensionless lens-distortion coefficient, initially 0.215. Used with K2 during screen blit, not a gameplay-coordinate change. Match actual lenses; the interface loads no QR profile automatically.

Returns double

Stored K1, not evidence of hardware or output quality.

GetK2double
# GetK2
C#
public double GetK2();

Returns stored K2, not a physical-device measurement. Second dimensionless lens-distortion coefficient, initially 0.215. Works with K1; not AA strength or a quality preset. The setter stores the number without establishing suitable lens calibration.

Returns double

Stored K2, not evidence of hardware or output quality.

GetOffsetRectRect2
# GetOffsetRect
C#
public Rect2 GetOffsetRect();

Returns stored OffsetRect, not a physical-device measurement. Output region relative to the screen rect, initially Rect2(0,0,1,1) for its full area. Position and Size are scaled by screen-rect dimensions; not pixels or a tracking-origin offset. Does not make a SubViewport visible on screen by itself.

Returns Rect2

Stored OffsetRect, not evidence of hardware or output quality.

GetOversampledouble
# GetOversample
C#
public double GetOversample();

Returns stored Oversample, not a physical-device measurement. Rendering multiplier, initially 1.5. Per-eye target is half window width × multiplier and window height × multiplier; also affects frustum and distortion upscale. Not MSAA or guaranteed improvement. A change clears projection cache; choose a positive device-appropriate value.

Returns double

Stored Oversample, not evidence of hardware or output quality.

GetVrsMinRadiusfloat
# GetVrsMinRadius
C#
public float GetVrsMinRadius();

Returns stored VrsMinRadius, not a physical-device measurement. Minimum central full-density VRS region as a size percentage, initially 20. The setter clamps to 1–100 with an out-of-range warning. Requires an active XR VRS path; a stored value establishes neither map use nor image quality.

Returns float

Stored VrsMinRadius, not evidence of hardware or output quality.

GetVrsStrengthfloat
# GetVrsStrength
C#
public float GetVrsStrength();

Returns stored VrsStrength, not a physical-device measurement. VRS-map strength, initially 1. The setter clamps to 0.1–10 with an out-of-range warning. Larger values change the density/quality trade-off, not a promised FPS. Actual map output and performance were not tested here.

Returns float

Stored VrsStrength, not evidence of hardware or output quality.

SetDisplayToLensvoid
# SetDisplayToLens
C#
public void SetDisplayToLens(double displayToLens);

Configures this interface’s DisplayToLens; does not initialize it. Display-to-lens distance in centimeters, initially 4.0. A divisor in frustum calculation: use a meaningful positive value. The setter stores it and clears projections on change; not automatic calibration.

Parameters
NameTypeDefault
displayToLensdouble—
displayToLens

Display-to-lens distance in centimeters, initially 4.0. A divisor in frustum calculation: use a meaningful positive value. The setter stores it and clears projections on change; not automatic calibration.

SetDisplayWidthvoid
# SetDisplayWidth
C#
public void SetDisplayWidth(double displayWidth);

Configures this interface’s DisplayWidth; does not initialize it. Physical display width in centimeters, initially 14.5. Used in frustum and lens-distortion layout; not a pixel count or window width. A change clears projection cache. The setter does not measure the device.

Parameters
NameTypeDefault
displayWidthdouble—
displayWidth

Physical display width in centimeters, initially 14.5. Used in frustum and lens-distortion layout; not a pixel count or window width. A change clears projection cache. The setter does not measure the device.

SetEyeHeightvoid
# SetEyeHeight
C#
public void SetEyeHeight(double eyeHeight);

Configures this interface’s EyeHeight; does not initialize it. Assumed head height in meters before WorldScale, initially 1.85. Not measured by positional sensors. Process writes this fixed Y into the head pose; gameplay movement/origin are separate.

Parameters
NameTypeDefault
eyeHeightdouble—
eyeHeight

Assumed head height in meters before WorldScale, initially 1.85. Not measured by positional sensors. Process writes this fixed Y into the head pose; gameplay movement/origin are separate.

SetIodvoid
# SetIod
C#
public void SetIod(double iod);

Configures this interface’s Iod; does not initialize it. Interocular distance in centimeters, initially 6.0. Produces −0.03/+0.03 eye offsets at WorldScale=1. A changed value clears offsets and projections; repeating the same value does not reset caches. Do not supply meters.

Parameters
NameTypeDefault
ioddouble—
iod

Interocular distance in centimeters, initially 6.0. Produces −0.03/+0.03 eye offsets at WorldScale=1. A changed value clears offsets and projections; repeating the same value does not reset caches. Do not supply meters.

SetK1void
# SetK1
C#
public void SetK1(double k);

Configures this interface’s K1; does not initialize it. First dimensionless lens-distortion coefficient, initially 0.215. Used with K2 during screen blit, not a gameplay-coordinate change. Match actual lenses; the interface loads no QR profile automatically.

Parameters
NameTypeDefault
kdouble—
k

First dimensionless lens-distortion coefficient, initially 0.215. Used with K2 during screen blit, not a gameplay-coordinate change. Match actual lenses; the interface loads no QR profile automatically.

SetK2void
# SetK2
C#
public void SetK2(double k);

Configures this interface’s K2; does not initialize it. Second dimensionless lens-distortion coefficient, initially 0.215. Works with K1; not AA strength or a quality preset. The setter stores the number without establishing suitable lens calibration.

Parameters
NameTypeDefault
kdouble—
k

Second dimensionless lens-distortion coefficient, initially 0.215. Works with K1; not AA strength or a quality preset. The setter stores the number without establishing suitable lens calibration.

SetOffsetRectvoid
# SetOffsetRect
C#
public void SetOffsetRect(Rect2 offsetRect);

Configures this interface’s OffsetRect; does not initialize it. Output region relative to the screen rect, initially Rect2(0,0,1,1) for its full area. Position and Size are scaled by screen-rect dimensions; not pixels or a tracking-origin offset. Does not make a SubViewport visible on screen by itself.

Parameters
NameTypeDefault
offsetRectRect2—
offsetRect

Output region relative to the screen rect, initially Rect2(0,0,1,1) for its full area. Position and Size are scaled by screen-rect dimensions; not pixels or a tracking-origin offset. Does not make a SubViewport visible on screen by itself.

SetOversamplevoid
# SetOversample
C#
public void SetOversample(double oversample);

Configures this interface’s Oversample; does not initialize it. Rendering multiplier, initially 1.5. Per-eye target is half window width × multiplier and window height × multiplier; also affects frustum and distortion upscale. Not MSAA or guaranteed improvement. A change clears projection cache; choose a positive device-appropriate value.

Parameters
NameTypeDefault
oversampledouble—
oversample

Rendering multiplier, initially 1.5. Per-eye target is half window width × multiplier and window height × multiplier; also affects frustum and distortion upscale. Not MSAA or guaranteed improvement. A change clears projection cache; choose a positive device-appropriate value.

SetVrsMinRadiusvoid
# SetVrsMinRadius
C#
public void SetVrsMinRadius(float radius);

Configures this interface’s VrsMinRadius; does not initialize it. Minimum central full-density VRS region as a size percentage, initially 20. The setter clamps to 1–100 with an out-of-range warning. Requires an active XR VRS path; a stored value establishes neither map use nor image quality.

Parameters
NameTypeDefault
radiusfloat—
radius

Minimum central full-density VRS region as a size percentage, initially 20. The setter clamps to 1–100 with an out-of-range warning. Requires an active XR VRS path; a stored value establishes neither map use nor image quality.

SetVrsStrengthvoid
# SetVrsStrength
C#
public void SetVrsStrength(float strength);

Configures this interface’s VrsStrength; does not initialize it. VRS-map strength, initially 1. The setter clamps to 0.1–10 with an out-of-range warning. Larger values change the density/quality trade-off, not a promised FPS. Actual map output and performance were not tested here.

Parameters
NameTypeDefault
strengthfloat—
strength

VRS-map strength, initially 1. The setter clamps to 0.1–10 with an out-of-range warning. Larger values change the density/quality trade-off, not a promised FPS. Actual map output and performance were not tested here.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.