Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pygame lerp

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
 
PREVIOUS NEXT
Tagged: #pygame #lerp
ADD COMMENT
Topic
Name
4+5 =