JointsData.cs 629 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. [System.Serializable]
  5. public class JointsData
  6. {
  7. public List<float> jointsPositionsX = new List<float>();
  8. public List<float> jointsPositionsY = new List<float>();
  9. public List<float> jointsPositionsZ = new List<float>();
  10. public JointsData(PlayerReplay playerReplay)
  11. {
  12. Transform[] joints = playerReplay.joints;
  13. foreach(Transform t in joints)
  14. {
  15. jointsPositionsX.Add(t.position.x);
  16. jointsPositionsY.Add(t.position.y);
  17. jointsPositionsZ.Add(t.position.z);
  18. }
  19. }
  20. }