godot-demo-projects/3d/ik/simple_bullet.gd

14 lines
250 B
GDScript3
Raw Normal View History

extends RigidBody
const KILL_TIME = 5
var timer = 0
func _ready():
set_physics_process(true);
func _physics_process(delta):
timer += delta
if timer > KILL_TIME:
queue_free()
timer = 0 # Make sure we are destroyed before we call this again!