File tree 3 files changed +25
-1
lines changed
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ func _ready():
9
9
print ("Supported refresh rates: " + str ($ FPSController/Configuration .get_available_refresh_rates ()))
10
10
print ("Supported color spaces: " + str ($ FPSController/Configuration .get_available_color_spaces ()))
11
11
print ("Current color space: " + str ($ FPSController/Configuration .get_color_space ()))
12
+ print ("Main session visible: " + str ($ FPSController/Configuration .get_main_session_visible ()))
13
+
14
+
15
+ var main_session_visible = false ;
12
16
13
17
func _process (delta ):
14
18
# Test for escape to close application, space to reset our reference frame
@@ -33,3 +37,15 @@ func _process(delta):
33
37
# this is a little dirty but we're going to just tie the trigger input of our controllers to their haptic output for testing
34
38
$ FPSController/LeftHandController .rumble = $ FPSController/LeftHandController .get_joystick_axis (JOY_VR_ANALOG_TRIGGER )
35
39
$ FPSController/RightHandController .rumble = $ FPSController/RightHandController .get_joystick_axis (JOY_VR_ANALOG_TRIGGER )
40
+
41
+ var main_session_visible_now = $ FPSController/Configuration .get_main_session_visible ();
42
+ var main_session_visible_changed = main_session_visible != main_session_visible_now
43
+ main_session_visible = main_session_visible_now
44
+
45
+ if (main_session_visible_changed ):
46
+ var env = $ WorldEnvironment .get_environment ()
47
+ if (main_session_visible ):
48
+ get_tree ().get_root ().set_transparent_background (true )
49
+ else :
50
+ get_tree ().get_root ().set_transparent_background (false )
51
+
Original file line number Diff line number Diff line change 1
- [gd_scene load_steps =19 format =2 ]
1
+ [gd_scene load_steps =20 format =2 ]
2
2
3
3
[ext_resource path ="res://Main.gd" type ="Script" id =1 ]
4
4
[ext_resource path ="res://Ground.tscn" type ="PackedScene" id =2 ]
5
5
[ext_resource path ="res://Table.tscn" type ="PackedScene" id =3 ]
6
6
[ext_resource path ="res://addons/godot-openxr/scenes/first_person_controller_vr.tscn" type ="PackedScene" id =4 ]
7
7
[ext_resource path ="res://addons/godot-openxr/assets/valve_hand_models/textures/vr_glove_color.jpg" type ="Texture" id =5 ]
8
+ [ext_resource path ="res://default_env.tres" type ="Environment" id =6 ]
8
9
[ext_resource path ="res://addons/godot-openxr/scenes/XRPose.tscn" type ="PackedScene" id =7 ]
9
10
[ext_resource path ="res://addons/godot-xr-tools/objects/Viewport_2D_in_3D.tscn" type ="PackedScene" id =8 ]
10
11
[ext_resource path ="res://ControllerInfo.tscn" type ="PackedScene" id =9 ]
@@ -157,6 +158,9 @@ viewport_size = Vector2( 600, 400 )
157
158
scene = ExtResource ( 12 )
158
159
collision_layer = 1024
159
160
161
+ [node name ="WorldEnvironment" type ="WorldEnvironment" parent ="." ]
162
+ environment = ExtResource ( 6 )
163
+
160
164
[editable path ="FPSController" ]
161
165
[editable path ="FPSController/LeftHand" ]
162
166
[editable path ="FPSController/LeftHand/HandModel" ]
Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ Fire={
47
47
3d_physics/layer_3 ="Objects"
48
48
3d_physics/layer_11 ="UI"
49
49
50
+ [network ]
51
+
52
+ limits/debugger_stdout/max_chars_per_second =4096
53
+
50
54
[rendering ]
51
55
52
56
quality/driver/driver_name ="GLES2"
You can’t perform that action at this time.
0 commit comments