📜  unity c# 获取对象的方向 - C# 代码示例

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

代码示例1
// Get direction from A to B
 Vector3 posA = ObjectA.position;
 Vector3 posB = ObjectB.position;
 //Destination - Origin
 Vector3 dir = (posB - posA).normalized;