Vector2.MoveTowards 移向

static function MoveTowards (current : Vector2, target : Vector2, maxDistanceDelta : float) : Vector2

Description描述

Moves a point current towards target.

当前的地点移向目标。

This is essentially the same as Vector2.Lerp but instead the function will ensure that the speed never exceeds maxDistanceDelta. Negative values of maxDistanceDelta pushes the vector away from target.

这个函数基本上和Vector2.Lerp相同,但是该函数将确保我们的速度绝不会超过maxDistanceDelta。maxDistanceDelta的负值从目标推开向量。

Page last updated: 2011-1-4