Explorar o código

:wrench: Prevent crash effects on walker

A walker on the top of the vehicle was making the crash effect to loop.
DricomDragon hai 1 ano
pai
achega
75ba6350fb
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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