Check out example codes for "godot c# move towards". It will help you in understanding the concepts better.

Code Example 1

Mathf.MoveToward(float from, float to, float delta);

Code Example 2

extends KinematicBody2D

var velocity = Vector2.ZERO

func _physics_process(delta):
	if Input. is_action_pressed("ui_right"):
		position.x += 4
	elif Input. is_action_pressed("ui_left"):
		position.x -= 4
	elif Input. is_action_pressed("ui_up"):
		position.y -= 4
	elif Input. is_action_pressed("ui_down"):
		position.y += 4

	move_and_collide(velocity)


#this one it the best and most simple one

Learn ReactJs, React Native from akashmittal.com