@vaguevoid/fiasco / math/vector / moveTowards
Function: moveTowards()
moveTowards(
current
,target
,delta
):void
Defined in: src/math/vector.ts:55
Mutates the current
vector towards the target
vector by the delta
amount.
Parameters
current
The vector to mutate.
target
The target vector to move towards.
delta
number
The amount to move in that direction.
Returns
void
Example
ts
moveTowards(enemy.position, player.position, consts.delta * ENEMY_SPEED)