12 lines
289 B
GDScript
12 lines
289 B
GDScript
extends RigidBody3D
|
|
|
|
|
|
var contacts: int = 0
|
|
|
|
func _on_body_entered(_body: Node) -> void:
|
|
contacts += 1
|
|
if contacts > 2:
|
|
var fire = preload("uid://l4t1mflutm3t").instantiate()
|
|
Session.dynamic_objects_parent.add_child(fire,true)
|
|
fire.global_position = global_position
|
|
queue_free()
|