More or less I was able to achieve the effect I wanted using linear_interpolate and an array:
Dad
if event is InputEventMouseMotion:
Body_Sprites.previous_direction.append(get_global_mouse_position())
look_at(get_global_mouse_position())
Child
var previous_direction: Array = []
func _process(delta):
if previous_direction.size() > 2:
var look: Vector2 = previous_direction[0].linear_interpolate(previous_direction[previous_direction.size() -1], delta)
Body.look_at(look.normalized())
previous_direction.erase(previous_direction[0])
This code works, but if the player is still, when the player moves the body looks in any direction, now if I don't know how to solve it