Selaa lähdekoodia

:wrench: Make the plane a vehicle body

Allow two further enhancements :
- A common vehicle inheritance
- A plane with wheels
DricomDragon 1 vuosi sitten
vanhempi
commit
98443bca83

+ 1 - 0
godot/component/entity/vehicles/jeep/jeep.gd

@@ -1,3 +1,4 @@
+class_name Jeep
 extends VehicleBody3D
 
 @export var max_engine_force: float = 500

+ 1 - 1
godot/component/entity/vehicles/plane/tiny_plane.gd

@@ -1,5 +1,5 @@
 class_name TinyPlane
-extends RigidBody3D
+extends VehicleBody3D
 
 @export var thrust_power: float = 10000.0
 @export var turn_to_torque: float = 2000.0

+ 1 - 1
godot/component/entity/vehicles/plane/tiny_plane.tscn

@@ -13,7 +13,7 @@ size = Vector3(5.20238, 0.197845, 1)
 [sub_resource type="BoxShape3D" id="BoxShape3D_stelr"]
 size = Vector3(1, 0.39856, 3.06068)
 
-[node name="TinyPlane" type="RigidBody3D" groups=["vehicle"]]
+[node name="TinyPlane" type="VehicleBody3D" groups=["vehicle"]]
 collision_layer = 8
 collision_mask = 3
 input_ray_pickable = false