-
Notifications
You must be signed in to change notification settings - Fork 35
/
Main.tscn
160 lines (122 loc) · 6.88 KB
/
Main.tscn
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[gd_scene load_steps=27 format=2]
[ext_resource path="res://Main.gd" type="Script" id=1]
[ext_resource path="res://assets/wahooney.itch.io/green_grid.tres" type="Material" id=2]
[ext_resource path="res://addons/godot-xr-tools/misc/VR_Common_Shader_Cache.tscn" type="PackedScene" id=3]
[ext_resource path="res://misc/Table.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/godot-openvr/scenes/ovr_controller.tscn" type="PackedScene" id=5]
[ext_resource path="res://addons/godot-xr-tools/functions/Function_Direct_movement.tscn" type="PackedScene" id=6]
[ext_resource path="res://addons/godot-xr-tools/functions/Function_Teleport.tscn" type="PackedScene" id=7]
[ext_resource path="res://misc/Box.tscn" type="PackedScene" id=8]
[ext_resource path="res://addons/godot-openvr/scenes/ovr_render_model.tscn" type="PackedScene" id=9]
[ext_resource path="res://addons/godot-xr-tools/objects/Viewport_2D_in_3D.tscn" type="PackedScene" id=10]
[ext_resource path="res://player/ButtonStates.tscn" type="PackedScene" id=11]
[ext_resource path="res://addons/godot-openvr/OpenVRController.gdns" type="Script" id=12]
[ext_resource path="res://addons/godot-openvr/scenes/ovr_main.gd" type="Script" id=13]
[ext_resource path="res://addons/godot-openvr/OpenVRPose.gdns" type="Script" id=14]
[ext_resource path="res://misc/SmallCube.tscn" type="PackedScene" id=15]
[ext_resource path="res://player/HandInteraction.tscn" type="PackedScene" id=16]
[ext_resource path="res://addons/godot-xr-tools/functions/Function_Pickup.tscn" type="PackedScene" id=17]
[ext_resource path="res://addons/godot-openvr/OpenVRAction.gdns" type="Script" id=18]
[ext_resource path="res://player/Guardian.tscn" type="PackedScene" id=19]
[ext_resource path="res://addons/godot-openvr/scenes/ovr_left_hand.tscn" type="PackedScene" id=20]
[ext_resource path="res://addons/godot-openvr/scenes/ovr_right_hand.tscn" type="PackedScene" id=21]
[ext_resource path="res://addons/godot-openvr/scenes/ovr_shader_cache.tscn" type="PackedScene" id=22]
[ext_resource path="res://misc/Cup.tscn" type="PackedScene" id=23]
[sub_resource type="ArrayMesh" id=1]
[sub_resource type="PlaneMesh" id=2]
material = ExtResource( 2 )
size = Vector2( 400, 400 )
subdivide_width = 10
subdivide_depth = 10
[sub_resource type="BoxShape" id=3]
extents = Vector3( 20, 0.1, 20 )
[node name="Main" type="Spatial"]
script = ExtResource( 1 )
[node name="DirectionalLight" type="DirectionalLight" parent="."]
transform = Transform( 0.857014, 0.0509786, -0.512765, 0.0356567, 0.986842, 0.157706, 0.514057, -0.15344, 0.84392, 0, 100, 0 )
shadow_enabled = true
shadow_bias = 0.01
directional_shadow_max_distance = 50.0
[node name="Player" type="ARVROrigin" parent="."]
script = ExtResource( 13 )
action_json_path = "res://ovr_actions/actions.json"
[node name="ARVRCamera" type="ARVRCamera" parent="Player"]
[node name="vr_common_shader_cache" parent="Player/ARVRCamera" instance=ExtResource( 3 )]
[node name="ovr_shader_cache" parent="Player/ARVRCamera" instance=ExtResource( 22 )]
[node name="Left_Hand" parent="Player" instance=ExtResource( 5 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 1.25, 0 )
[node name="Function_Teleport" parent="Player/Left_Hand" instance=ExtResource( 7 )]
collision_mask = 1048574
camera = NodePath("../../ARVRCamera")
[node name="Function_Pickup" parent="Player/Left_Hand" instance=ExtResource( 17 )]
collision_layer = 0
collision_mask = 4
[node name="Right_Hand" type="ARVRController" parent="Player"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 1.25, 0 )
controller_id = 2
script = ExtResource( 12 )
button_actions = PoolStringArray( "/actions/godot/in/custom_boolean" )
[node name="OVRRenderModel" parent="Player/Right_Hand" instance=ExtResource( 9 )]
[node name="Function_Direct_movement" parent="Player/Right_Hand" instance=ExtResource( 6 )]
camera = NodePath("../../ARVRCamera")
player_radius = 0.2
canFly = false
[node name="Viewport2Din3D" parent="Player/Right_Hand" instance=ExtResource( 10 )]
transform = Transform( 0.707107, 2.98023e-08, -0.707107, 0.5, 0.707107, 0.5, 0.5, -0.707107, 0.5, 0.15, 0.1, 0 )
screen_size = Vector2( 0.2, 0.2 )
viewport_size = Vector2( 200, 200 )
transparent = true
scene = ExtResource( 11 )
collision_layer = 0
[node name="Function_Pickup" parent="Player/Right_Hand" instance=ExtResource( 17 )]
collision_layer = 0
collision_mask = 4
[node name="Left_Hand_Pose" type="Spatial" parent="Player"]
script = ExtResource( 14 )
action = "/actions/godot/in/custom_pose"
on_hand = 1
[node name="Hand_Interaction" parent="Player/Left_Hand_Pose" instance=ExtResource( 16 )]
on_hand = 1
[node name="Right_Hand_Pose" type="Spatial" parent="Player"]
script = ExtResource( 14 )
action = "/actions/godot/in/custom_pose"
on_hand = 2
[node name="Hand_Interaction" parent="Player/Right_Hand_Pose" instance=ExtResource( 16 )]
on_hand = 2
[node name="Guardian" parent="Player" instance=ExtResource( 19 )]
visible = false
mesh = SubResource( 1 )
[node name="Toggle" type="Spatial" parent="Player/Guardian"]
script = ExtResource( 18 )
pressed_action = "/actions/godot/in/toggle_guardian"
[node name="ovr_left_hand" parent="Player" instance=ExtResource( 20 )]
transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, -0.5, 1.25, 0 )
[node name="ovr_right_hand" parent="Player" instance=ExtResource( 21 )]
transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0.5, 1.25, 0 )
[node name="Floor" type="StaticBody" parent="."]
collision_layer = 2
collision_mask = 0
[node name="Mesh" type="MeshInstance" parent="Floor"]
mesh = SubResource( 2 )
material/0 = null
[node name="CollisionShape" type="CollisionShape" parent="Floor"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.1, 0 )
shape = SubResource( 3 )
[node name="Misc" type="Spatial" parent="."]
[node name="Table" parent="Misc" instance=ExtResource( 4 )]
[node name="SmallCube" parent="Misc/Table" instance=ExtResource( 15 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.16215, 0.429381 )
[node name="Cup01" parent="Misc/Table" instance=ExtResource( 23 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.264883, 1.1647, 0.494545 )
[node name="Cup02" parent="Misc/Table" instance=ExtResource( 23 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.435989, 1.1647, 0.494545 )
[node name="Cup03" parent="Misc/Table" instance=ExtResource( 23 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.581078, 1.1647, 0.494545 )
[node name="Box01" parent="Misc" instance=ExtResource( 8 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 1, -4 )
[node name="Box02" parent="Misc" instance=ExtResource( 8 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 2, -4 )
[node name="Box03" parent="Misc" instance=ExtResource( 8 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 3, -4 )
[connection signal="action_pressed" from="Player/Right_Hand" to="." method="_on_Right_Hand_action_pressed"]
[connection signal="pressed" from="Player/Guardian/Toggle" to="." method="_on_Toggle_Guardian_pressed"]