标签:blog io ar os sp for on div log
var qua = Quaternion.FromToRotation(Vector3.forward, target.transform.position - transform.position);
transform.rotation = Quaternion.Lerp(transform.rotation, qua, time);
Quaternion.FromToRotation是沿某个向量位置,旋转到某个向量位置。
这里是以+y位置作为目标做旋转,所以LookAt的方向是+y位置
标签:blog io ar os sp for on div log
原文地址:http://www.cnblogs.com/hont/p/4131679.html