瀏覽代碼

:tada: Create the jeep

DricomDragon 1 年之前
父節點
當前提交
cf86d7b972

+ 54 - 0
first3d/component/entity/vehicles/jeep/Jeep.tscn

@@ -0,0 +1,54 @@
+[gd_scene load_steps=4 format=3 uid="uid://cj5dmtqadl5nf"]
+
+[ext_resource type="PackedScene" uid="uid://dlaj4npd144qd" path="res://component/entity/vehicles/jeep/OrangeJeep_noWheel.glb" id="1_qgclq"]
+[ext_resource type="PackedScene" uid="uid://cg6eyxgui8y2s" path="res://component/entity/vehicles/jeep/OrangeJeep_wheel.glb" id="2_f6y5a"]
+
+[sub_resource type="BoxShape3D" id="BoxShape3D_1maan"]
+size = Vector3(1, 0.769157, 3.09562)
+
+[node name="Jeep" type="VehicleBody3D"]
+collision_layer = 8
+collision_mask = 11
+mass = 500.0
+engine_force = 43.42
+steering = -0.253945
+
+[node name="OrangeJeep_noWheel" parent="." instance=ExtResource("1_qgclq")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)
+
+[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.925237, 0)
+shape = SubResource("BoxShape3D_1maan")
+
+[node name="FrontRightWheel" type="VehicleWheel3D" parent="."]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.6, 0.2, 1)
+steering = -0.253945
+use_as_steering = true
+wheel_radius = 0.3
+
+[node name="OrangeJeep_wheel" parent="FrontRightWheel" instance=ExtResource("2_f6y5a")]
+transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
+
+[node name="FrontLeftWheel" type="VehicleWheel3D" parent="."]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.6, 0.2, 1)
+steering = -0.253945
+use_as_steering = true
+wheel_radius = 0.3
+
+[node name="OrangeJeep_wheel" parent="FrontLeftWheel" instance=ExtResource("2_f6y5a")]
+
+[node name="RearLeftWheel" type="VehicleWheel3D" parent="."]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.6, 0.2, -1.01869)
+engine_force = 43.42
+use_as_traction = true
+wheel_radius = 0.3
+
+[node name="OrangeJeep_wheel" parent="RearLeftWheel" instance=ExtResource("2_f6y5a")]
+
+[node name="RearRightWheel" type="VehicleWheel3D" parent="."]
+transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, -0.6, 0.2, -1.019)
+engine_force = 43.42
+use_as_traction = true
+wheel_radius = 0.3
+
+[node name="OrangeJeep_wheel" parent="RearRightWheel" instance=ExtResource("2_f6y5a")]

二進制
first3d/component/entity/vehicles/jeep/OrangeJeep_noWheel.glb


+ 32 - 0
first3d/component/entity/vehicles/jeep/OrangeJeep_noWheel.glb.import

@@ -0,0 +1,32 @@
+[remap]
+
+importer="scene"
+importer_version=1
+type="PackedScene"
+uid="uid://dlaj4npd144qd"
+path="res://.godot/imported/OrangeJeep_noWheel.glb-a93568bc9d81951c288bce7919401464.scn"
+
+[deps]
+
+source_file="res://component/entity/vehicles/jeep/OrangeJeep_noWheel.glb"
+dest_files=["res://.godot/imported/OrangeJeep_noWheel.glb-a93568bc9d81951c288bce7919401464.scn"]
+
+[params]
+
+nodes/root_type="Node3D"
+nodes/root_name="Scene Root"
+nodes/apply_root_scale=true
+nodes/root_scale=1.0
+meshes/ensure_tangents=true
+meshes/generate_lods=true
+meshes/create_shadow_meshes=true
+meshes/light_baking=1
+meshes/lightmap_texel_size=0.2
+skins/use_named_skins=true
+animation/import=true
+animation/fps=30
+animation/trimming=false
+animation/remove_immutable_tracks=true
+import_script/path=""
+_subresources={}
+gltf/embedded_image_handling=1

二進制
first3d/component/entity/vehicles/jeep/OrangeJeep_wheel.glb


+ 32 - 0
first3d/component/entity/vehicles/jeep/OrangeJeep_wheel.glb.import

@@ -0,0 +1,32 @@
+[remap]
+
+importer="scene"
+importer_version=1
+type="PackedScene"
+uid="uid://cg6eyxgui8y2s"
+path="res://.godot/imported/OrangeJeep_wheel.glb-36372445c741609c6bbd178edeb37930.scn"
+
+[deps]
+
+source_file="res://component/entity/vehicles/jeep/OrangeJeep_wheel.glb"
+dest_files=["res://.godot/imported/OrangeJeep_wheel.glb-36372445c741609c6bbd178edeb37930.scn"]
+
+[params]
+
+nodes/root_type="Node3D"
+nodes/root_name="Scene Root"
+nodes/apply_root_scale=true
+nodes/root_scale=1.0
+meshes/ensure_tangents=true
+meshes/generate_lods=true
+meshes/create_shadow_meshes=true
+meshes/light_baking=1
+meshes/lightmap_texel_size=0.2
+skins/use_named_skins=true
+animation/import=true
+animation/fps=30
+animation/trimming=false
+animation/remove_immutable_tracks=true
+import_script/path=""
+_subresources={}
+gltf/embedded_image_handling=1

+ 5 - 1
first3d/run/levels/infinite_level.tscn

@@ -1,10 +1,11 @@
-[gd_scene load_steps=8 format=3 uid="uid://7ivipmwaw24t"]
+[gd_scene load_steps=9 format=3 uid="uid://7ivipmwaw24t"]
 
 [ext_resource type="Script" path="res://run/levels/camera_tracker.gd" id="1_qdm47"]
 [ext_resource type="PackedScene" uid="uid://b10k58capm04o" path="res://component/entity/walker/walker.tscn" id="1_x0026"]
 [ext_resource type="PackedScene" uid="uid://bk0s5bn8k08bc" path="res://flow/control/local_input/local_input.tscn" id="2_0i5t8"]
 [ext_resource type="PackedScene" uid="uid://bcpri2x5afoyb" path="res://component/entity/box/box.tscn" id="2_e8xto"]
 [ext_resource type="PackedScene" uid="uid://dao17ylietgyl" path="res://component/entity/vehicles/plane/tiny_plane.tscn" id="4_tbpfc"]
+[ext_resource type="PackedScene" uid="uid://cj5dmtqadl5nf" path="res://component/entity/vehicles/jeep/Jeep.tscn" id="6_nnvc5"]
 
 [sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_2xulb"]
 
@@ -60,6 +61,9 @@ transform = Transform3D(0.477312, 0.527326, -0.702923, -0.741391, 0.671074, 0, 0
 [node name="TinyPlane2" parent="." instance=ExtResource("4_tbpfc")]
 transform = Transform3D(-0.589079, -0.650805, -0.478999, -0.741391, 0.671074, 1.34747e-08, 0.321443, 0.355125, -0.877816, -10.5959, 3.94108, -6.48481)
 
+[node name="Jeep" parent="." instance=ExtResource("6_nnvc5")]
+transform = Transform3D(1, 0, 0, 0, 0.956386, -0.292105, 0, 0.292105, 0.956386, -16.454, 5.25324, -7.30216)
+
 [connection signal="focus_required" from="MainWalker" to="CameraTracker" method="_on_focus_required"]
 [connection signal="dir_changed" from="MainWalker/Control" to="MainWalker" method="_on_dir_changed"]
 [connection signal="get_in_action" from="MainWalker/Control" to="MainWalker" method="_on_get_in_action"]