From 872e36b8f9d748807cc8b60df8aad6b8f0855999 Mon Sep 17 00:00:00 2001
From: avemort <666mon@gmail.com>
Date: Mon, 7 Nov 2022 15:18:31 -0300
Subject: [PATCH] expose ARVRInterface::get_transform_for_eye to gdscript
---
doc/classes/ARVRInterface.xml | 8 ++++++++
servers/arvr/arvr_interface.cpp | 1 +
2 files changed, 9 insertions(+)
diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml
index f4ecef2c9e9..ae1fe1f5193 100644
--- a/doc/classes/ARVRInterface.xml
+++ b/doc/classes/ARVRInterface.xml
@@ -41,6 +41,14 @@
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
+
+
+
+
+
+ Returns the transform for an eye multiplied by [code]transform[/code]. The usual value for [code]transform[/code] is the global_transform of the current ARVROrigin.
+
+
diff --git a/servers/arvr/arvr_interface.cpp b/servers/arvr/arvr_interface.cpp
index 49526b074d5..91075a17e93 100644
--- a/servers/arvr/arvr_interface.cpp
+++ b/servers/arvr/arvr_interface.cpp
@@ -46,6 +46,7 @@ void ARVRInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_render_targetsize"), &ARVRInterface::get_render_targetsize);
ClassDB::bind_method(D_METHOD("is_stereo"), &ARVRInterface::is_stereo);
+ ClassDB::bind_method(D_METHOD("get_transform_for_eye", "eye", "transform"), &ARVRInterface::get_transform_for_eye);
ADD_GROUP("Interface", "interface_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interface_is_primary"), "set_is_primary", "is_primary");