summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2023-03-01 20:02:25 +1100
committerYuri Sizov <yuris@humnom.net>2023-03-27 16:56:22 +0200
commita94a2062af97f634f8192208a59f1656d1af680f (patch)
tree0521599f5e620b81c2098fb5926b74a7b1fdd946 /servers
parent7a3f8a83da792865d717cc2dd793ec24449ef6d7 (diff)
Add XRServer.world_origin property
(cherry picked from commit fd8f26f26e2f8875e4e305bc22f04f0deaf9a44c)
Diffstat (limited to 'servers')
-rw-r--r--servers/xr_server.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/xr_server.cpp b/servers/xr_server.cpp
index 85ef684d40..bab8e9ae4b 100644
--- a/servers/xr_server.cpp
+++ b/servers/xr_server.cpp
@@ -52,11 +52,14 @@ XRServer *XRServer::get_singleton() {
void XRServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_world_scale"), &XRServer::get_world_scale);
ClassDB::bind_method(D_METHOD("set_world_scale", "scale"), &XRServer::set_world_scale);
+ ClassDB::bind_method(D_METHOD("get_world_origin"), &XRServer::get_world_origin);
+ ClassDB::bind_method(D_METHOD("set_world_origin", "world_origin"), &XRServer::set_world_origin);
ClassDB::bind_method(D_METHOD("get_reference_frame"), &XRServer::get_reference_frame);
ClassDB::bind_method(D_METHOD("center_on_hmd", "rotation_mode", "keep_height"), &XRServer::center_on_hmd);
ClassDB::bind_method(D_METHOD("get_hmd_transform"), &XRServer::get_hmd_transform);
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "world_scale"), "set_world_scale", "get_world_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "world_origin"), "set_world_origin", "get_world_origin");
ClassDB::bind_method(D_METHOD("add_interface", "interface"), &XRServer::add_interface);
ClassDB::bind_method(D_METHOD("get_interface_count"), &XRServer::get_interface_count);