Godot Version 4,3
I try to make “$Collision.disabled = true” in the code but it doesn’t work and collisions keep happening.
but it doesn’t work only in this code:
func _on_area_entered(area: Area2D) -> void:
if area.has_method("fire"):
$Collision.disabled = true
print("$Collision.disabled ", $Collision.disabled)
The function “_on_area_entered” is executed, the print works and writes ($Collision.disabled true), but collisions keep happening.
if I write it like this, everything works:
func _ready() -> void:
$Collision.disabled = true