SyncCameraPos.cs 350 B

1234567891011121314151617
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class SyncCameraPos : MonoBehaviour
  5. {
  6. public Transform actorTrans;
  7. public Vector3 offsetPos;
  8. void LateUpdate()
  9. {
  10. if(actorTrans != null)
  11. {
  12. this.transform.position = actorTrans.position + offsetPos;
  13. }
  14. }
  15. }