Hello, sorry for dummy question but cannot figure out why it does not work.
So I have RayCast2D, where I take collision point via:
teleport_dest = ray.get_collision_point()
Then I am trying to move my player to this point with code:
var x = move_toward(position.x, teleport_dest.x, delta)
var y = move_toward(position.y, teleport_dest.y, delta)
move_and_slide(Vector2(x, y))
But it move player complitly do different way. What I am doing in wrong way?