added car rigidbody

This commit is contained in:
thatTopHatCat
2025-07-11 18:34:46 -04:00
parent 97912e82d9
commit a1d1192773
5 changed files with 84 additions and 3 deletions

BIN
RX-Maybe-Full.glb Normal file

Binary file not shown.

42
RX-Maybe-Full.glb.import Normal file
View File

@@ -0,0 +1,42 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b8lbj1eualsmd"
path="res://.godot/imported/RX-Maybe-Full.glb-64feddc11af9546829fa841e47d354d8.scn"
[deps]
source_file="res://RX-Maybe-Full.glb"
dest_files=["res://.godot/imported/RX-Maybe-Full.glb-64feddc11af9546829fa841e47d354d8.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1

16
car.tscn Normal file
View File

@@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=3 uid="uid://dklnyvh2pawj1"]
[ext_resource type="PackedScene" uid="uid://b8lbj1eualsmd" path="res://RX-Maybe-Full.glb" id="1_7822p"]
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_7822p"]
points = PackedVector3Array(4.139968, -1.4051584, 7.194319, 4.086217, 0.67367995, 3.550845, 3.8805149, 0.06082487, 10.316475, 3.8805149, -0.28529537, 10.365959, 3.8805149, -1.3395332, 9.901031, 3.8805149, -1.4882485, 9.093161, 4.101205, -1.452525, 5.8869953, 4.090868, -1.3400624, 2.313721, 4.090868, -0.7586968, 2.240069, 2.9662268, 1.1687802, 4.7292776, 2.9662268, 1.1687802, 7.0021334, 3.7073739, 0.30268574, 10.304966, 3.909458, -0.7494352, -0.95228624, 3.8805149, -0.07201326, 0.64389133, 3.7187445, -0.36256373, -0.78771996, 3.3249133, 0.22515261, -0.4091025, 3.8231456, -0.5536179, 10.689338, 3.7125423, -0.92567074, 10.653663, 1.8803484, -1.0087608, 10.649059, -0.881122, -1.3395332, 9.901031, -0.881122, -1.4882485, 9.093161, 3.8805149, -1.4882485, 0.2422576, 3.8805149, -1.4538481, -0.68759924, 2.3806484, 1.1936544, 4.7292776, 3.238084, 0.24685133, -0.4091025, 2.591002, 0.40853286, -0.4091025, 2.3806484, 1.1936544, 7.0021334, 2.4824657, 0.6202272, 10.377467, 3.0582244, 0.58291614, 10.332586, 3.7507885, -0.7499644, -0.9614927, 2.81531, -0.7536691, -1.0144302, 1.8803484, -0.75737375, -1.0662167, 1.8803484, -0.52609766, 10.685885, -0.810315, -0.5536179, 10.690489, 1.1190445, -1.0087608, 10.649059, -0.65733075, -0.89788586, 10.653663, -0.881122, -0.28529537, 10.365959, -1.1400583, -1.4051584, 7.194319, -1.1018122, -1.452525, 5.8869953, -0.881122, -1.4882485, 0.2422576, -0.881122, -1.4538481, -0.68759924, 1.8803484, -0.9444586, -0.9649452, 1.8803484, 1.2148238, 4.7292776, 0.40839112, 0.40853286, -0.4091025, 1.1190445, 1.2150882, 4.7292776, 1.8803484, 1.2148238, 7.0021334, 0.51692724, 0.6202272, 10.377467, 1.1190445, 1.2150882, 7.0021334, 1.1190445, -0.75737375, -1.0662167, 1.1190445, -0.52609766, 10.685885, -0.881122, 0.06082487, 10.316475, -0.881122, -0.058517814, 10.333736, -0.059348106, 0.58291614, 10.332586, -0.70849776, 0.30268574, 10.304966, -1.0868238, 0.67367995, 3.550845, -1.0919923, -0.7586968, 2.240069, -1.0919923, -1.3400624, 2.313721, -0.9157502, -0.75737375, -1.0121285, -0.88990825, -1.2715263, -0.77275944, 0.1871841, -0.75737375, -1.0420496, 1.1190445, -0.9444586, -0.9649452, -0.8175508, -0.55996877, -0.90049964, -0.7193514, -0.36256373, -0.78771996, -0.23920804, 0.24685133, -0.4091025, 0.03316605, 1.1687802, 4.7292776, 0.03316605, 1.1687802, 7.0021334, -0.32552016, 0.22515261, -0.4091025, -0.881122, -0.07201326, 0.64389133)
[node name="Car" type="RigidBody3D"]
mass = 1000.0
[node name="RX-Maybe-Full" parent="." instance=ExtResource("1_7822p")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5, 0, 0)
[node name="CollisionShape3D2" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5, 2.5993881, -4.478353)
shape = SubResource("ConvexPolygonShape3D_7822p")

View File

@@ -1,4 +1,6 @@
[gd_scene load_steps=4 format=3 uid="uid://0g0o5q26t5d4"]
[gd_scene load_steps=6 format=3 uid="uid://0g0o5q26t5d4"]
[ext_resource type="PackedScene" uid="uid://dklnyvh2pawj1" path="res://car.tscn" id="1_ig7tw"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_7dm0k"]
sky_horizon_color = Color(0.66224277, 0.6717428, 0.6867428, 1)
@@ -13,14 +15,31 @@ sky = SubResource("Sky_ig7tw")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7dm0k"]
albedo_color = Color(0.3366, 0.51985997, 0.66, 1)
[node name="Main" type="Node3D"]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 15.603066, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_0xm2m")
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.93826985, 0.34590417, 0, -0.34590417, 0.93826985, 0, 0.92334867, 1.8026888)
transform = Transform3D(0.6360783, -0.11979078, 0.7622694, -1.4901161e-08, 0.987876, 0.15524495, -0.77162457, -0.09874797, 0.62836653, 25.20988, 10.386948, 12.099594)
[node name="Car" parent="." instance=ExtResource("1_ig7tw")]
transform = Transform3D(1, 0, 0, 0, 0.9398835, -0.34149528, 0, 0.34149528, 0.9398835, 0, 20.074368, 0)
[node name="CSGBox3D2" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.7605286, 22.911652, -59.135998)
material_override = SubResource("StandardMaterial3D_7dm0k")
use_collision = true
size = Vector3(47.551025, 48.6026, 39.738293)
[node name="CSGBox3D" type="CSGBox3D" parent="."]
material_override = SubResource("StandardMaterial3D_7dm0k")
use_collision = true
size = Vector3(178.75879, 1, 233.49219)

View File

@@ -14,3 +14,7 @@ config/name="3d car game"
run/main_scene="res://main.tscn"
config/features=PackedStringArray("4.5", "Forward Plus")
config/icon="res://icon.svg"
[physics]
3d/physics_engine="Jolt Physics"