📜  如何使游戏对象跟随另一个对象的路径 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:54.980000             🧑  作者: Mango

代码示例1
void Update()
{
transform. position = Vector3. Lerp(transform. position, target. position, speedPosition * Time. deltaTime);
transform. rotation = Quaternion. Slerp(transform. rotation, target. rotation, speedRotation * Time. deltaTime);
}