sıddııık
Centipat
- Katılım
- 31 Ağustos 2022
- Mesajlar
- 272
Daha fazla
- Cinsiyet
- Erkek
Kamera takip kodu için
Using System. Collections;
Using System. Collections. Generic;
Using UnityEngine;
Using UnityEngine. UI;
Public class CameraController: MonoBehaviour
{
Public GameObject Player;
Private Vector3 offset;
Void Start()
{
Offset = transform. Position - Player. Transform. Position;
}
// Update is called once per frame
Void LateUpdate()
{
Transform. Position = Player. Transform. Position + offset;
}
}
Kodunu kullandım ama Player sağa veyahut sola döndüğünde cameranında sağa sola dönmesini nasıl sağlayabilirim? Yardımcı olabilir misiniz?
Using System. Collections;
Using System. Collections. Generic;
Using UnityEngine;
Using UnityEngine. UI;
Public class CameraController: MonoBehaviour
{
Public GameObject Player;
Private Vector3 offset;
Void Start()
{
Offset = transform. Position - Player. Transform. Position;
}
// Update is called once per frame
Void LateUpdate()
{
Transform. Position = Player. Transform. Position + offset;
}
}
Kodunu kullandım ama Player sağa veyahut sola döndüğünde cameranında sağa sola dönmesini nasıl sağlayabilirim? Yardımcı olabilir misiniz?