fix: 2d surface hit graphics no longer appear when hitting an entity
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user