首页 > 其他 > 详细

U3D向量投影

时间:2015-04-30 15:47:13      阅读:255      评论:0      收藏:0      [点我收藏+]

技术分享

官方例图

 

测试:

 技术分享

 

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

U3D向量投影

原文:http://www.cnblogs.com/hont/p/4468789.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!