more tweaks to breakable vent and barrel can now explode

This commit is contained in:
derek
2024-12-12 16:15:01 -06:00
parent 763b074148
commit 78dc14b84f
15 changed files with 297 additions and 104 deletions

View File

@@ -48,8 +48,8 @@ func explode():
var blast_velocity = blast_direction * blast_power * blast_amount
#apply and/or damage
if body.is_in_group("scene_rigidbody"):
if body.is_in_group("breakable"):
if body.get_class() == "RigidBody3D":
if body.has_method("breaking"):
body.breaking(blast_velocity)
else:
body.linear_velocity += blast_velocity