fix: 2d surface hit graphics no longer appear when hitting an entity

This commit is contained in:
DottsGit
2026-06-06 01:18:51 -04:00
parent e41e64de78
commit 46cee744d1
4 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -133,7 +133,8 @@ func _setup_effects() -> void:
func _on_hit(result: Dictionary) -> void:
if not result.collider.has_method("take_damage"):
ImpactSpawner.spawn(get_tree(), "crater", result.position, result.normal, explosion_radius * 1.5)
if result.collider is StaticBody3D or result.collider is CSGShape3D:
ImpactSpawner.spawn(get_tree(), "crater", result.position, result.normal, explosion_radius * 1.5)
_explode(result.position)
destroy()