def lerp(point_a, point_b, length): a = pg.math.Vector2(point_a) b = pg.math.Vector2(point_b) dir = b - a try: dir.normalize_ip() except: pass dir *= length dest = a + dir return dest