CopyTransform.cs 310 B

1234567891011121314151617
  1. using UnityEngine;
  2. class CopyTransform : MonoBehaviour
  3. {
  4. [SerializeField] private Transform origin;
  5. void Update()
  6. {
  7. transform.position = origin.position;
  8. transform.rotation = origin.rotation;
  9. }
  10. public void SetOrigin(Transform value)
  11. {
  12. origin = value;
  13. }
  14. }