This repository has been archived on 2022-01-09. You can view files and clone it, but cannot push or open issues/pull-requests.
liblast/Game/Assets/Weapons/Projectile.gd

24 lines
592 B
GDScript

extends AnimatableBody3D
@export var hit_effect_scene : PackedScene
@export var speed : float
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
constant_linear_velocity = Vector3.FORWARD * speed
$OmniLight3D/Smoke.emitting = true
func _physics_process(delta):
#constant_linear_velocity = Vector3(1, 0, 0)
move_and_collide(global_transform.basis[0]*Vector3.FORWARD * speed)
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass