extends Node3D func _process(_delta): # Copy only the Y rotation of the camera pivot. # This avoids the problem of the transform.basis not pointing forward if you tilt the camera # up or down, messing with the movement vector of the player rotation = Vector3(0, get_parent().rotation.y, 0)