[gd_scene load_steps=16 format=2] [ext_resource path="res://assets/basic_buggy.glb" type="PackedScene" id=1] [ext_resource path="res://vehicles/tire_smoke.tscn" type="PackedScene" id=2] [ext_resource path="res://vehicles/vehicle.gd" type="Script" id=3] [ext_resource path="res://vehicles/steering_controller.gd" type="Script" id=4] [ext_resource path="res://vehicles/meter.gd" type="Script" id=5] [ext_resource path="res://assets/engine.wav" type="AudioStream" id=6] [ext_resource path="res://vehicles/pedal.gd" type="Script" id=7] [ext_resource path="res://assets/wind woosh loop.ogg" type="AudioStream" id=8] [sub_resource type="Curve" id=2] _data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.0660377, 0.243255 ), 0.0, 0.0, 0, 0, Vector2( 0.25, 0.563636 ), 4.02975, 4.02975, 0, 0, Vector2( 0.518868, 0.761364 ), 3.22818, 3.22818, 0, 0, Vector2( 0.849057, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ] [sub_resource type="CapsuleShape" id=11] radius = 0.452181 height = 2.78888 [sub_resource type="Curve" id=8] _data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.205682 ), 0.0, 0.0, 0, 0 ] [sub_resource type="CurveTexture" id=9] curve = SubResource( 8 ) [sub_resource type="ParticlesMaterial" id=5] direction = Vector3( 0, 0, -1 ) gravity = Vector3( 0, 0.2, 0 ) initial_velocity = 0.8 scale = 0.2 scale_random = 0.25 scale_curve = SubResource( 9 ) color = Color( 0.521569, 0.521569, 0.521569, 0.435294 ) [sub_resource type="SpatialMaterial" id=10] flags_transparent = true vertex_color_use_as_albedo = true [sub_resource type="SphereMesh" id=7] material = SubResource( 10 ) radial_segments = 4 rings = 3 [node name="buggy" groups=["car"] instance=ExtResource( 1 )] mass = 1400.0 script = ExtResource( 3 ) max_engine_force = 1250.0 max_brake_force = 220.0 throttle_power = 10000.0 max_rpm_loss_ps = 4000.0 base_engine_pitch = 0.45 drag_factor = 1.65 downforce_factor = 1.1 gear_ratios = [ 3.8, 2.7, 2.2, 1.75, 1.4, 1.2 ] max_rpm = 5000.0 power_curve = SubResource( 2 ) automatic_gear_up_threshold = 0.85 automatic_gear_down_threshold = 0.4 [node name="brake_pedal" parent="chassis/cockpit" index="0"] script = ExtResource( 7 ) [node name="clutch_pedal" parent="chassis/cockpit" index="1"] script = ExtResource( 7 ) [node name="gas_pedal" parent="chassis/cockpit" index="2"] script = ExtResource( 7 ) [node name="rpm_meter" parent="chassis/cockpit" index="3"] transform = Transform( 1, 0, 0, 0, 0.351842, 0.93606, 0, -0.93606, 0.351842, 0.036114, 0.360487, 0.695986 ) script = ExtResource( 5 ) needle_path = NodePath("rpm_needle") [node name="rpm_needle" parent="chassis/cockpit/rpm_meter" index="0"] transform = Transform( 1, 0, 0, 0, 0.351842, -0.93606, 0, 0.93606, 0.351842, -0.000453245, 0.000504017, -0.00276601 ) [node name="speed_meter" parent="chassis/cockpit" index="4"] script = ExtResource( 5 ) needle_path = NodePath("speed_needle") [node name="speed_needle" parent="chassis/cockpit/speed_meter" index="0"] transform = Transform( 1, 0, 0, 0, 0.351841, -0.93606, 0, 0.93606, 0.351841, -0.00056617, 0.000744879, -0.00399888 ) [node name="steering_controller" parent="chassis/cockpit" index="5"] script = ExtResource( 4 ) [node name="front_left" parent="." index="1"] use_as_steering = true wheel_radius = 0.6 wheel_rest_length = 0.68 wheel_friction_slip = 2.7 suspension_travel = 1.2 suspension_stiffness = 4.5 suspension_max_force = 14000.0 damping_compression = 0.9 damping_relaxation = 0.94 [node name="CollisionShape" type="CollisionShape" parent="." index="2"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.23227, 0 ) shape = SubResource( 11 ) [node name="front_right" parent="." index="4"] transform = Transform( 1, 0, 0, 0, 1, -1.50996e-07, 0, 1.50996e-07, 1, -0.950754, 0.503756, 1.41438 ) use_as_steering = true wheel_radius = 0.6 wheel_rest_length = 0.68 wheel_friction_slip = 2.7 suspension_travel = 1.2 suspension_stiffness = 4.5 suspension_max_force = 14000.0 damping_compression = 0.9 damping_relaxation = 0.94 [node name="front_right" parent="front_right" index="0"] transform = Transform( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) [node name="rear_left" parent="." index="5"] use_as_traction = true wheel_radius = 0.6 wheel_rest_length = 0.68 wheel_friction_slip = 2.1 suspension_travel = 1.2 suspension_stiffness = 4.5 suspension_max_force = 14000.0 damping_compression = 0.9 damping_relaxation = 0.94 [node name="rear_right" parent="." index="6"] transform = Transform( 1, 0, 0, 0, 1, -1.50996e-07, 0, 1.50996e-07, 1, -0.950755, 0.503756, -1.41438 ) use_as_traction = true wheel_radius = 0.6 wheel_rest_length = 0.68 wheel_friction_slip = 2.1 suspension_travel = 1.2 suspension_stiffness = 4.5 suspension_max_force = 14000.0 damping_compression = 0.9 damping_relaxation = 0.94 [node name="rear_right" parent="rear_right" index="0"] transform = Transform( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) [node name="engine_sound_player" type="AudioStreamPlayer3D" parent="." index="7"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.14201, -1.46122 ) stream = ExtResource( 6 ) pitch_scale = 0.1 bus = "Sound" [node name="Smoke" type="Particles" parent="." index="8"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.855953, -1.87797 ) local_coords = false process_material = SubResource( 5 ) draw_pass_1 = SubResource( 7 ) [node name="fl_tire_smoke" parent="." index="9" instance=ExtResource( 2 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.950754, -0.0380455, 1.41438 ) [node name="fr_tire_smoke" parent="." index="10" instance=ExtResource( 2 )] transform = Transform( 1, 0, 0, 0, 1, -1.50996e-07, 0, 1.50996e-07, 1, -0.950754, -0.038045, 1.41438 ) [node name="rl_tire_smoke" parent="." index="11" instance=ExtResource( 2 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.950753, -0.0380455, -1.41438 ) [node name="rr_tire_smoke" parent="." index="12" instance=ExtResource( 2 )] transform = Transform( 1, 0, 0, 0, 1, -1.50996e-07, 0, 1.50996e-07, 1, -0.950755, -0.038045, -1.41438 ) [node name="cockpit" type="Position3D" parent="." index="13"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.44962, 0.200323 ) [node name="hood" type="Position3D" parent="." index="14"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.31056, 0.894584 ) [node name="bumper" type="Position3D" parent="." index="15"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.811448, 1.79879 ) [node name="static_follow" type="Position3D" parent="." index="16"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.15146, -4.84184 ) [node name="wind_sound_player" type="AudioStreamPlayer3D" parent="." index="17"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.39214, 1.12139 ) stream = ExtResource( 8 ) [connection signal="brake_updated" from="." to="chassis/cockpit/brake_pedal" method="_on_value_updated"] [connection signal="clutch_updated" from="." to="chassis/cockpit/clutch_pedal" method="_on_value_updated"] [connection signal="rpm_updated" from="." to="chassis/cockpit/rpm_meter" method="_on_value_updated"] [connection signal="speed_updated" from="." to="chassis/cockpit/speed_meter" method="_on_value_updated"] [connection signal="steering_updated" from="." to="chassis/cockpit/steering_controller" method="_on_steering_updated"] [connection signal="throttle_updated" from="." to="chassis/cockpit/gas_pedal" method="_on_value_updated"]