raycast now does not pierce walls

This commit is contained in:
Rendo 2025-11-27 11:49:33 +05:00
commit 388fe1ccce
3 changed files with 8 additions and 3 deletions

View file

@ -37,8 +37,7 @@ func fire() -> void:
machine.animation_player.stop()
machine.animation_player.play(with_morphems("shoot"))
if raycast.is_colliding():
raycast.get_collider().hp -= damage
raycast.try_deal_damage(damage)
fire_timer.start()
machine.player_camera.recoil(horizontal_curve.sample(bullets_shot),vertical_curve.sample(bullets_shot))