[gd_scene load_steps=15 format=3 uid="uid://bkbn6qrfvqmn8"]

[ext_resource type="Script" path="res://scripts/tank.gd" id="1_6c63f"]
[ext_resource type="PackedScene" uid="uid://c7irk0uh63yuc" path="res://shell.tscn" id="2_3caw6"]

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_salnv"]
albedo_color = Color(0.125911, 0.125911, 0.125911, 1)

[sub_resource type="BoxMesh" id="BoxMesh_fij7d"]
material = SubResource("StandardMaterial3D_salnv")
size = Vector3(3, 0.25, 1)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0dey3"]
albedo_color = Color(0.12549, 0.329412, 0.12549, 1)

[sub_resource type="BoxMesh" id="BoxMesh_kgkfd"]
material = SubResource("StandardMaterial3D_0dey3")
size = Vector3(1, 0.5, 1)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3o3nm"]
albedo_color = Color(0.12549, 0.329412, 0.12549, 1)

[sub_resource type="PrismMesh" id="PrismMesh_3ue88"]
material = SubResource("StandardMaterial3D_3o3nm")
left_to_right = 0.0
size = Vector3(0.5, 0.5, 1)

[sub_resource type="PrismMesh" id="PrismMesh_6gdce"]
material = SubResource("StandardMaterial3D_3o3nm")
left_to_right = 0.0
size = Vector3(1.5, 0.5, 1)

[sub_resource type="TubeTrailMesh" id="TubeTrailMesh_1but8"]
material = SubResource("StandardMaterial3D_0dey3")
radius = 0.25
radial_steps = 6
sections = 2
section_length = 0.125
section_rings = 1

[sub_resource type="CylinderMesh" id="CylinderMesh_0gwbh"]
material = SubResource("StandardMaterial3D_0dey3")
top_radius = 0.05
bottom_radius = 0.05
height = 1.5

[sub_resource type="TubeTrailMesh" id="TubeTrailMesh_43oho"]
material = SubResource("StandardMaterial3D_0dey3")
radius = 0.1
radial_steps = 6
sections = 2

[sub_resource type="Environment" id="Environment_j5wkj"]
fog_enabled = true

[sub_resource type="BoxShape3D" id="BoxShape3D_okse4"]
size = Vector3(3.05127, 1.65424, 1)

[node name="Tank" type="CharacterBody3D" node_paths=PackedStringArray("turret", "turret_hinge", "shell_fire_point", "reload_timer")]
collision_mask = 6
script = ExtResource("1_6c63f")
turret = NodePath("Body/Turret")
turret_hinge = NodePath("Body/Turret/Barrel Anchorpoint")
shell_prefab = ExtResource("2_3caw6")
shell_fire_point = NodePath("Body/Turret/Barrel Anchorpoint/Marker3D")
reload_timer = NodePath("Reload Timer")

[node name="Body" type="Node3D" parent="."]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 0.625803, 0)

[node name="MeshInstance3D" type="MeshInstance3D" parent="Body"]
mesh = SubResource("BoxMesh_fij7d")
skeleton = NodePath("../..")

[node name="MeshInstance3D2" type="MeshInstance3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, -0.375, 0)
mesh = SubResource("BoxMesh_kgkfd")
skeleton = NodePath("../..")

[node name="MeshInstance3D3" type="MeshInstance3D" parent="Body"]
transform = Transform3D(-1, -8.74228e-08, 0, 8.74228e-08, -1, 0, 0, 0, 1, -1.24701, -0.375, 0)
mesh = SubResource("PrismMesh_3ue88")
skeleton = NodePath("../..")

[node name="MeshInstance3D4" type="MeshInstance3D" parent="Body"]
transform = Transform3D(1, -8.74228e-08, -8.74228e-08, -8.74228e-08, -1, 0, -8.74228e-08, 7.64274e-15, -1, 0.75, -0.375, 0)
mesh = SubResource("PrismMesh_6gdce")
skeleton = NodePath("../..")

[node name="MeshInstance3D5" type="MeshInstance3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, -1, 8.74228e-08, 0, -8.74228e-08, -1, -0.5, 0.375, 0)
mesh = SubResource("BoxMesh_kgkfd")
skeleton = NodePath("../..")

[node name="MeshInstance3D6" type="MeshInstance3D" parent="Body"]
transform = Transform3D(-1, -1.50996e-07, 0, -1.50996e-07, 1, 8.74228e-08, -1.32005e-14, 8.74228e-08, -1, -1.24701, 0.375, 0)
mesh = SubResource("PrismMesh_3ue88")
skeleton = NodePath("../..")

[node name="MeshInstance3D7" type="MeshInstance3D" parent="Body"]
transform = Transform3D(1, -1.50996e-07, 1.50996e-07, 1.50996e-07, 1, 8.74228e-08, -1.50996e-07, -8.74228e-08, 1, 0.75, 0.375, 0)
mesh = SubResource("PrismMesh_6gdce")
skeleton = NodePath("../..")

[node name="Turret" type="Node3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.558581, 0.749197, 2.44164e-08)

[node name="MeshInstance3D" type="MeshInstance3D" parent="Body/Turret"]
mesh = SubResource("TubeTrailMesh_1but8")

[node name="Barrel Anchorpoint" type="Node3D" parent="Body/Turret"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.167599, 0, 0)

[node name="MeshInstance3D2" type="MeshInstance3D" parent="Body/Turret/Barrel Anchorpoint"]
transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 0.757496, 0, 0)
mesh = SubResource("CylinderMesh_0gwbh")
skeleton = NodePath("../..")

[node name="MeshInstance3D3" type="MeshInstance3D" parent="Body/Turret/Barrel Anchorpoint"]
transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 1.70639, 0, 0)
mesh = SubResource("TubeTrailMesh_43oho")
skeleton = NodePath("../..")

[node name="Marker3D" type="Marker3D" parent="Body/Turret/Barrel Anchorpoint"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.70922, 0, -7.47123e-08)

[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(-1, -4.29162e-08, 7.61639e-08, 0, 0.871214, 0.490904, -8.74228e-08, 0.490904, -0.871214, 0, 1.997, -2.171)
environment = SubResource("Environment_j5wkj")
current = true

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -0.0133962, 0.830963, 0.0217024)
shape = SubResource("BoxShape3D_okse4")

[node name="Reload Timer" type="Timer" parent="."]
wait_time = 2.0

[connection signal="timeout" from="Reload Timer" to="." method="_on_reload_timer_timeout"]
