Skip to content

raylib.Vector2MoveTowards

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Move Vector towards target

Parameters

Parameter Default Value Note
v [0, 0]
target [0, 0]
maxDistance 0

Return value

Condition Return Value
(always) list

Notes

Example

v = [0, 0]
target = [10, 0]
result = raylib.Vector2MoveTowards(v, target, 3)
print result  // [3, 0]

Clone this wiki locally