攝像機簡單跟隨

最簡單的一種就是先設置好攝像機跟物體的相對距離, 在腳本里就可以由物體的位置,跟相對距離,就可以求出攝像機的位置, 用插值的方法可以讓攝像機平滑跟隨。 1 public class CamFollow1 : MonoBehaviour 2 { 3 4 private Vector3 offset; 5 public Transform player; 6 7 void Start() 8 { 9
相關文章
相關標籤/搜索