CopyHandRig.cs 648 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using UnityEngine;
  3. public class CopyHandRig : MonoBehaviour
  4. {
  5. private void Start()
  6. {
  7. }
  8. private void Update()
  9. {
  10. this.m_trDestRoot.position = this.m_trSrcRoot.position;
  11. this.m_trDestRoot.rotation = this.m_trSrcRoot.rotation;
  12. this.m_trDestPalm.rotation = this.m_trSrcPalm.rotation;
  13. for (int i = 0; i < this.m_trSrcFinger.Length; i++)
  14. {
  15. this.m_trDestFinger[i].rotation = this.m_trSrcFinger[i].rotation;
  16. }
  17. }
  18. public Transform m_trSrcRoot;
  19. public Transform m_trDestRoot;
  20. public Transform m_trSrcPalm;
  21. public Transform m_trDestPalm;
  22. public Transform[] m_trSrcFinger;
  23. public Transform[] m_trDestFinger;
  24. }