📜  unity agent 看看 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:13.509000             🧑  作者: Mango

代码示例1
private void FaceTarget(Vector3 destination)
{
    Vector3 lookPos = destination - transform.position;
    lookPos.y = 0;
    Quaternion rotation = Quaternion.LookRotation(lookPos);
    transform.rotation = Quaternion.Slerp(transform.rotation, rotation, [fill in desired rotation speed]);  
}