-
Notifications
You must be signed in to change notification settings - Fork 37
/
Main.tscn
82 lines (60 loc) · 2.55 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
[gd_scene load_steps=13 format=2]
[ext_resource path="res://Main.gd" type="Script" id=1]
[ext_resource path="res://assets/textures.com/RockGrassy0142_2/TexturesCom_RockGrassy0142_2_seamless_S.jpg" type="Texture" id=2]
[ext_resource path="res://scenes/cars/caterham/car.tscn" type="PackedScene" id=3]
[ext_resource path="res://player/VR/vr_camera.tscn" type="PackedScene" id=4]
[ext_resource path="res://assets/Scenes/track-base.tscn" type="PackedScene" id=5]
[sub_resource type="PhysicsMaterial" id=1]
[sub_resource type="PlaneShape" id=2]
[sub_resource type="Shader" id=3]
code = "shader_type spatial;
uniform sampler2D terrain_texture : hint_albedo;
varying vec2 terrain_uv;
void vertex() {
terrain_uv = (WORLD_MATRIX * vec4(VERTEX, 1.0)).xz * vec2(0.2, 0.2);
}
void fragment() {
vec4 color = texture(terrain_texture, terrain_uv);
ALBEDO = color.rgb;
METALLIC = 0.0;
ROUGHNESS = 0.8;
}"
[sub_resource type="ShaderMaterial" id=4]
shader = SubResource( 3 )
shader_param/terrain_texture = ExtResource( 2 )
[sub_resource type="PlaneMesh" id=5]
material = SubResource( 4 )
size = Vector2( 1000, 1000 )
subdivide_width = 10
subdivide_depth = 10
[sub_resource type="SpatialMaterial" id=6]
albedo_texture = ExtResource( 2 )
uv1_scale = Vector3( 100, 100, 100 )
[sub_resource type="PhysicsMaterial" id=7]
[node name="Main" type="Spatial"]
script = ExtResource( 1 )
[node name="Ground" type="StaticBody" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0 )
physics_material_override = SubResource( 1 )
[node name="CollisionShape" type="CollisionShape" parent="Ground"]
shape = SubResource( 2 )
[node name="MeshInstance" type="MeshInstance" parent="Ground"]
mesh = SubResource( 5 )
material/0 = SubResource( 6 )
[node name="Sun" type="DirectionalLight" parent="."]
transform = Transform( 0.353542, 0.746557, -0.563615, -0.565523, 0.650531, 0.506945, 0.745112, 0.139511, 0.652185, 0, 4.1408, 0 )
shadow_enabled = true
[node name="Car" type="Spatial" parent="."]
transform = Transform( 0.56717, 0, -0.823601, 0, 1, 0, 0.823601, 0, 0.56717, -13.0877, 0.05164, 0 )
[node name="Car" parent="Car" instance=ExtResource( 3 )]
transform = Transform( 0.51946, 0, 0.854495, 0, 1, 0, -0.854495, 0, 0.51946, 0, 0, 0 )
physics_material_override = SubResource( 7 )
[node name="ARVROrigin" parent="Car/Car" instance=ExtResource( 4 )]
[node name="Track" type="Spatial" parent="."]
[node name="Path" parent="Track" instance=ExtResource( 5 )]
lower_ground_width = 12.0
rail_distance = 1.0
post_distance = 1.0
[node name="Speed" type="Label" parent="."]
margin_right = 40.0
margin_bottom = 14.0