[gd_scene load_steps=9 format=3 uid="uid://d4ljkc7l57udr"]

[ext_resource type="Script" uid="uid://hufd4xlq7b6k" path="res://scripts/road_manager.gd" id="1_lbhrr"]
[ext_resource type="PackedScene" uid="uid://mu3b314l3soy" path="res://scenes/road.tscn" id="1_lnu2h"]
[ext_resource type="Script" uid="uid://cs0y5pe8qnj2r" path="res://scripts/player.gd" id="2_lnu2h"]
[ext_resource type="PackedScene" uid="uid://cewenjpq8wbig" path="res://objects/testcar.glb" id="2_yqjtg"]

[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_lnu2h"]
sky_top_color = Color(0, 0.388235, 1, 1)
sky_horizon_color = Color(0.485671, 0.57498, 0.718921, 1)
ground_horizon_color = Color(0.485671, 0.57498, 0.718921, 1)

[sub_resource type="Sky" id="Sky_lbhrr"]
sky_material = SubResource("ProceduralSkyMaterial_lnu2h")

[sub_resource type="Environment" id="Environment_iywne"]
background_mode = 2
sky = SubResource("Sky_lbhrr")
tonemap_mode = 2
glow_enabled = true

[sub_resource type="BoxShape3D" id="BoxShape3D_yqjtg"]
size = Vector3(3.60051, 2.21851, 1.87103)

[node name="Game" type="Node3D"]

[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
texture_filter = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
stretch = true
stretch_shrink = 4

[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
size = Vector2i(320, 240)

[node name="WorldEnvironment" type="WorldEnvironment" parent="SubViewportContainer/SubViewport"]
environment = SubResource("Environment_iywne")

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(-0.866024, -0.433016, 0.250001, 0, 0.499998, 0.866026, -0.500003, 0.749999, -0.43301, 0, 0, 0)
shadow_enabled = true

[node name="Player" type="CharacterBody3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.510139, 0, -0.578158)
script = ExtResource("2_lnu2h")

[node name="TestCar" parent="SubViewportContainer/SubViewport/Player" instance=ExtResource("2_yqjtg")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9.53674e-07, -0.463639)

[node name="CollisionShape3D" type="CollisionShape3D" parent="SubViewportContainer/SubViewport/Player"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.279745, 1.10964, -0.462006)
shape = SubResource("BoxShape3D_yqjtg")

[node name="Head" type="Node3D" parent="SubViewportContainer/SubViewport/Player"]
transform = Transform3D(0.965536, 0.260269, 0, -0.260269, 0.965536, 0, 0, 0, 1, 0, 1.54334, -0.215674)

[node name="Camera3D" type="Camera3D" parent="SubViewportContainer/SubViewport/Player/Head"]
transform = Transform3D(-4.25071e-08, -0.233123, 0.972447, -1.01901e-08, 0.972447, 0.233123, -1, 4.14113e-14, -4.37115e-08, -0.181639, 0.104743, 0.247312)

[node name="RoadManager" type="Node3D" parent="SubViewportContainer/SubViewport" node_paths=PackedStringArray("player")]
script = ExtResource("1_lbhrr")
player = NodePath("../Player")

[node name="Road" parent="SubViewportContainer/SubViewport/RoadManager" instance=ExtResource("1_lnu2h")]
