13 lines
276 B
GDScript
13 lines
276 B
GDScript
extends Node3D
|
|
|
|
@export var speed : float = 100
|
|
|
|
func _physics_process(delta: float) -> void:
|
|
var velocity = speed * -get_parent().transform.basis.z
|
|
get_parent().velocity = velocity
|
|
|
|
if get_parent().move_and_slide():
|
|
get_parent().projectile_collision()
|
|
queue_free()
|
|
|