瀏覽代碼

: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