Преглед на файлове

:wrench: Prevent crash effects on walker

A walker on the top of the vehicle was making the crash effect to loop.
DricomDragon преди 1 година
родител
ревизия
75ba6350fb
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      godot/component/entity/vehicles/seated_vehicle.gd

+ 3 - 0
godot/component/entity/vehicles/seated_vehicle.gd

@@ -31,6 +31,9 @@ func _integrate_forces(state: PhysicsDirectBodyState3D) -> void:
 
 
 func _on_body_shape_entered(body_rid: RID, body: Node, body_shape_index: int, local_shape_index: int) -> void:
+	if body is Walker:
+		return
+
 	_has_collided = true