标签:
Find a point on a "line" between two Vector3
http://forum.unity3d.com/threads/find-a-point-on-a-line-between-two-vector3.140700/
public Vector3 LerpByDistance(Vector3 A, Vector3 B, float x) { Vector3 P = x * Vector3.Normalize(B - A) + A; return P; }
Tips: x can more than the distance between A and B
Vector3 Lerp(Vector3 start, Vector3 end, float percent) { return (start + percent*(end - start)); }
Find a point on a "line" between two Vector3
标签:
原文地址:http://www.cnblogs.com/elfnaga/p/5362893.html