-
Notifications
You must be signed in to change notification settings - Fork 38
/
GameMain.gd
37 lines (27 loc) · 1.26 KB
/
GameMain.gd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This is the main entry point for the demo scenes of the godot oculus quest toolkit
# Please check https://github.com/NeoSpark314/godot_oculus_quest_toolkit for documentation
extends Node
var room_list = [
"res://demo_scenes/UIDemoScene.tscn",
"res://demo_scenes/PhysicsScene.tscn",
"res://demo_scenes/ClimbingScene.tscn",
"res://demo_scenes/experiments/TableTennis.tscn",
"res://demo_scenes/experiments/TestRoom.tscn",
"res://demo_scenes/WalkInPlaceDemoScene.tscn",
]
var current_room = 0;
func _process(_dt):
pass;
func _ready():
vr.initialize();
vr.scene_switch_root = self;
# This is required for WebXR support to wait until the user pressed the button
# the buttons itself are created inside the vr.initialize();
if (vr.arvr_webxr_interface): yield(vr, "signal_webxr_started");
# Always advertise Godot a bit in the beginning
if (vr.inVR): vr.switch_scene("res://demo_scenes/GodotSplash.tscn", 0.0, 0.0);
vr.switch_scene(room_list[current_room], 0.1, 5.0);
#vr.switch_scene("res://demo_scenes/experiments/TestRoom.tscn")
vr.log_info(" Tracking space is: %d" % vr.get_tracking_space());
vr.log_info(str(" get_boundary_oriented_bounding_box is: ", vr.get_boundary_oriented_bounding_box()));
vr.log_info("Engine.target_fps = %d" % Engine.target_fps);