16 lines
556 B
GDScript
16 lines
556 B
GDScript
extends Node3D
|
|
|
|
@export var movement_controller: CharacterBody3D
|
|
@onready var skeleton: Skeleton3D = $Model/Armature/Skeleton3D
|
|
# Called when the node enters the scene tree for the first time.
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _physics_process(delta: float) -> void:
|
|
global_position = movement_controller.global_position
|
|
# -- Get the head rotation on x
|
|
# -- Rotate the body on x
|
|
var bone_idx: int = skeleton.find_bone("mixamorig_Head")
|
|
if bone_idx == -1:
|
|
return
|
|
#global_rotation.y = head_pose.y
|
|
pass
|