Godot Version
v4.2.stable.official [46dc277]
Question
(https://github.com/godotengine/godot/assets/40333518/8733229f-6566-443f-9678-de11a9b0fceb)
When I trigger die
with a button, collision_disabled
is set to true and it works as expected. Player can phase through the blocks and the enemy.
When the enemy triggers the die
instead, although collision_disabled
is seemingly also set to true, everything works as if it wasn’t. Player can’t phase through blocks and the enemy continues to hit the player.
And for some incomprehensible reason, if die
is triggered by other means, such as using collision detection in the enemy
script, then the bug does not happen:
if collider is Player:
print('enemy hit player (collision)')
collider.die()