can save and load player loc/rot and held guns

This commit is contained in:
derek
2024-12-02 14:59:43 -06:00
parent 842cc7ecfd
commit eee708c7f1
9 changed files with 110 additions and 12 deletions

View File

@@ -3,13 +3,14 @@ extends Node3D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
print("CROWN IN SCENE")
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)
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)