Vector3.MoveTowards 移向

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

Description描述

Moves a point current towards target.

当前的地点移向目标。

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

这个函数基本上和Vector3.Lerp相同,而是该函数将确保我们的速度不会超过maxDistanceDelta。maxDistanceDelta的负值从目标推开向量,就是说maxDistanceDelta是正值,当前地点移向目标,如果是负值当前地点将远离目标。

Page last updated: 2010-12-20