Files
fps_project_1/scripts/crown.gd

17 lines
427 B
GDScript

extends Node3D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
target_change()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func target_change():
var target = get_node(SaveLoad.last_hit_path)
if target:
global_rotation = Vector3(0,0,0)
global_transform.origin = target.global_position + Vector3(0,2,0)