Now About Social Code
summaryrefslogtreecommitdiff
path: root/scripts/bullet.gd
blob: 93c119a71c061177e20da7e8072d7e6934e3668a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extends Node3D

var target: Vector3

var bullet_speed = 100.0

# Called when the node enters the scene tree for the first time.
#func _ready() -> void:
#	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	position = position.move_toward(target, bullet_speed * delta)
	
	if (target - position).length_squared() <= 2:
		queue_free()