Files
3d-car-game/car.tscn
Wheelbarrow 15547fce8d Added engine force, air resistance, and rolling resistance
also added debug draw 3d addon
2025-07-26 10:16:43 -04:00

49 lines
4.5 KiB
Plaintext

[gd_scene load_steps=6 format=3 uid="uid://dklnyvh2pawj1"]
[ext_resource type="PackedScene" uid="uid://b4q25yxjds0hu" path="res://RX-Car.glb" id="1_7822p"]
[ext_resource type="Script" uid="uid://brdagffuckrxo" path="res://car.gd" id="1_uoj53"]
[ext_resource type="PackedScene" uid="uid://cqcmml6o1x724" path="res://wheel.tscn" id="3_k61xc"]
[sub_resource type="Curve" id="Curve_k61xc"]
_limits = [0.0, 500.0, 0.0, 10000.0]
_data = [Vector2(0, 303.40942), 0.0, 0.0, 0, 0, Vector2(4272.152, 489.27692), 0.0, 0.0, 0, 0, Vector2(8554.853, 31.756958), 0.0, 0.0, 0, 0]
point_count = 3
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_7822p"]
points = PackedVector3Array(2.639865, -0.93180054, 2.1575794, 2.5861135, 1.1470379, -1.4858942, 2.3804116, 0.5341828, 5.2797356, 2.3804116, 0.18806255, 5.32922, 2.3804116, -0.8661753, 4.864291, 2.3804116, -1.0148906, 4.0564213, 2.6011019, -0.9791671, 0.85025597, 2.590765, -0.8667045, -2.7230182, 2.590765, -0.28533888, -2.7966702, 1.4661236, 1.6421381, -0.30746174, 1.4661236, 1.6421381, 1.965394, 2.2072706, 0.77604365, 5.2682266, 2.4093547, -0.27607727, -5.989025, 2.3804116, 0.40134466, -4.392848, 2.2186413, 0.11079419, -5.824459, 1.82481, 0.6985105, -5.445842, 2.3230424, -0.08025998, 5.6525984, 2.212439, -0.45231283, 5.6169233, 0.3802452, -0.5354029, 5.61232, -2.3812249, -0.8661753, 4.864291, -2.3812249, -1.0148906, 4.0564213, 2.3804116, -1.0148906, -4.7944813, 2.3804116, -0.9804902, -5.7243385, 0.8805454, 1.6670123, -0.30746174, 1.7379808, 0.72020924, -5.445842, 1.0908988, 0.8818908, -5.445842, 0.8805454, 1.6670123, 1.965394, 0.9823625, 1.0935851, 5.340728, 1.5581212, 1.056274, 5.295847, 2.2506852, -0.2766065, -5.998232, 1.3152068, -0.28031117, -6.0511694, 0.3802452, -0.28401583, -6.102956, 0.3802452, -0.05273974, 5.649146, -2.310418, -0.08025998, 5.6537495, -0.38105845, -0.5354029, 5.61232, -2.1574335, -0.42452794, 5.6169233, -2.3812249, 0.18806255, 5.32922, -2.640161, -0.93180054, 2.1575794, -2.601915, -0.9791671, 0.85025597, -2.3812249, -1.0148906, -4.7944813, -2.3812249, -0.9804902, -5.7243385, 0.3802452, -0.4711007, -6.001684, 0.3802452, 1.6881818, -0.30746174, -1.0917118, 0.8818908, -5.445842, -0.38105845, 1.6884462, -0.30746174, 0.3802452, 1.6881818, 1.965394, -0.98317564, 1.0935851, 5.340728, -0.38105845, 1.6884462, 1.965394, -0.38105845, -0.28401583, -6.102956, -0.38105845, -0.05273974, 5.649146, -2.3812249, 0.5341828, 5.2797356, -2.3812249, 0.4148401, 5.296997, -1.559451, 1.056274, 5.295847, -2.2086005, 0.77604365, 5.2682266, -2.5869267, 1.1470379, -1.4858942, -2.5920951, -0.28533888, -2.7966702, -2.5920951, -0.8667045, -2.7230182, -2.415853, -0.28401583, -6.0488677, -2.390011, -0.7981685, -5.8094983, -1.3129189, -0.28401583, -6.0787888, -0.38105845, -0.4711007, -6.001684, -2.3176537, -0.08661085, -5.9372387, -2.2194543, 0.11079419, -5.824459, -1.739311, 0.72020924, -5.445842, -1.4669368, 1.6421381, -0.30746174, -1.4669368, 1.6421381, 1.965394, -1.825623, 0.6985105, -5.445842, -2.3812249, 0.40134466, -4.392848)
[node name="Car" type="RigidBody3D" node_paths=PackedStringArray("front_right", "front_left", "back_right", "back_left")]
mass = 1000.0
script = ExtResource("1_uoj53")
torque_curve = SubResource("Curve_k61xc")
front_right = NodePath("WheelFR")
front_left = NodePath("WheelFL")
back_right = NodePath("WheelRR")
back_left = NodePath("WheelRL")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(0.36002815, 0, 0, 0, 0.36002856, 0, 0, 0, 0.36002815, -0.010458469, 0.12041265, -0.23569715)
shape = SubResource("ConvexPolygonShape3D_7822p")
[node name="RX-Car" parent="." instance=ExtResource("1_7822p")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5505377, 0.29083502, -2.049065)
[node name="WheelRR" parent="." instance=ExtResource("3_k61xc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.883119, -0.15691829, 0.9406)
flipped = true
on_drivetrain = true
[node name="WheelFR" parent="." instance=ExtResource("3_k61xc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.883119, -0.13746506, -1.6053799)
flipped = true
[node name="WheelFL" parent="." instance=ExtResource("3_k61xc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.9021299, -0.15691829, -1.6053799)
[node name="WheelRL" parent="." instance=ExtResource("3_k61xc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.9021299, -0.13746506, 0.9405999)
on_drivetrain = true
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.9641093, 0.26550564, 0, -0.26550564, 0.9641093, 0, 1.8623276, 4.216471)