I'm making an enemy ai who chases the player, but when they get stuck on an object, like a rock I want them to move away from it a little so they can continue chasing.
This is how I move towards my target
$Raycast.cast_to = (Target.global_position - global_position)
$Raycast.force_raycast_update()
DIR = $Raycast.cast_to.normalized()
var motion = DIR * SPEED
move_and_slide(motion)
so how do you move a point away from another point, I have no idea, thanks