Skip to main content

Vector2.MoveTowards(Vector2 current, Vector2 target, number maxDistanceDelta)

Moves a point current towards target.

Parameters:

NameTypeDescription
currentVector2
targetVector2
maxDistanceDeltanumber

Returns:

typeDescription
Vector2result

Usage

---@type Vector2
local current;

---@type Vector2
local target;

---@type number
local maxDistanceDelta;


local val0 = Vector2:MoveTowards(current, target, maxDistanceDelta)