20 lines
463 B
C#
20 lines
463 B
C#
using Godot;
|
|
using System;
|
|
|
|
public partial class XrOrigin3d : XROrigin3D
|
|
{
|
|
private XRInterface _xrInterface;
|
|
|
|
public override void _Ready()
|
|
{
|
|
_xrInterface = XRServer.FindInterface("OpenXR");
|
|
if (_xrInterface == null || !_xrInterface.IsInitialized())
|
|
GD.PushError("Failed to initialize OpenXR");
|
|
|
|
GD.PushError("OpenXR Initialized successfully");
|
|
|
|
DisplayServer.WindowSetVsyncMode(DisplayServer.VSyncMode.Disabled);
|
|
GetViewport().UseXR = true;
|
|
}
|
|
}
|