📜  c# unity 相机跟随玩家水平轴 - C# 代码示例

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

代码示例1
public Transform Target;
Vector3 tempVec3 = new Vector3();

void LateUpdate()
{
    tempVec3.x = Target.position.x;
    tempVec3.y = this.transform.position.y;
    tempVec3.z = this.transform.position.z;
    this.transform.position = tempVec3;
}