标签:

官方例图
测试:

code:
public Transform point1; public Transform point2; public Transform humanPoint; public Transform targetPoint; void Start() { } void Update() { targetPoint.position = point1.position + Vector3.Project(humanPoint.position - point1.position, point2.position - point1.position); }
官方论坛扩展阅读LINK
标签:
原文地址:http://www.cnblogs.com/hont/p/4468789.html