Selaa lähdekoodia

:wrench: Prevent crash effects on walker

A walker on the top of the vehicle was making the crash effect to loop.
DricomDragon 1 vuosi sitten
vanhempi
commit
75ba6350fb
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  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