ladder and rats looking pretty good. still need to fix rat holes
This commit is contained in:
@@ -17,6 +17,9 @@ func breaking(current_velocity):
|
||||
spawn_broken.position = global_position
|
||||
spawn_broken.transform.basis = global_transform.basis
|
||||
spawn_broken.rotation = rotation
|
||||
|
||||
var pieces = spawn_broken.get_children()
|
||||
for piece in pieces:
|
||||
if piece is RigidBody3D:
|
||||
piece.linear_velocity += current_velocity
|
||||
get_tree().get_root().add_child(spawn_broken)
|
||||
queue_free()
|
||||
|
||||
Reference in New Issue
Block a user