So I have this character, that moves to wherever i click on a map with a limited distance to travel. After tweaking the tree of it(Adding a camera with a characterBody3D and some other stuff), it started floating and moving in place wherever i sent it to. I'll drop the code, and screenshot from the nodes im using to test this (the one called "the hero" is the character itself).
extends CharacterBody3D
@onready var nav_agent : NavigationAgent3D = $NavigationAgent3D
@onready var path_predic : Node3D = $PathPredictor
@onready var pointer : Node3D = $Pointer
@onready var campivot : Node3D = $Pivot
@onready var cam : Camera3D = $Pivot/Camera3D
@onready var atk_area : Area3D = $AttackHitboxes
@onready var atk_hb : Array[CollisionShape3D] = [$AttackHitboxes/Cone, $AttackHitboxes/Cilinder, $AttackHitboxes/Sphere, $AttackHitboxes/Line, $AttackHitboxes/AreaCilinder, $AttackHitboxes/AreaCube]
@export var speed = 3.0
@export var camspeed = 20
@export var camsens = .025
@export var max_dist = 5
var path_point : PackedVector3Array
var is_moving : bool
var dist_unused = max_dist
var hp : int
var res : Array[String]
var vul : Array[String]