const MOTION_SPEED = 350 # Pixels/second<br>
func ... <br>
var m = get_global_mouse_pos()
var motion = Vector2(m.x-get_pos().x,m.y-get_pos().y)
motion = motion.normalized()*MOTION_SPEED*delta
move(motion)
Sort: Trending
const MOTION_SPEED = 350 # Pixels/second<br>
func ... <br>
var m = get_global_mouse_pos()
var motion = Vector2(m.x-get_pos().x,m.y-get_pos().y)
motion = motion.normalized()*MOTION_SPEED*delta
move(motion)