Unity攝像機跟隨角色移動

//這裏演示下如何讓Main Camera跟隨在角色身後,隨着角色旋轉而保持在角色身後,相似生化危機這樣第三人稱的效果,工程前置爲新建一個Cube命名爲Player做爲角色。代碼以下: public class CameraFollow : MonoBehaviour { private Player m_Player;//角色 public Vector3 offset;//角色與攝像機位置誤差
相關文章
相關標籤/搜索