Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- [AddComponentMenu("Bone Container/Bone Container")]
- public class BoneContainer : MonoBehaviour
- {
- public Transform[] Bones = null;
- public Vector3 PostionFix;
- public Quaternion RotationFix = Quaternion.Euler(0, 0, 0);
- void Update()
- {
- foreach (Transform bone in Bones)
- {
- bone.position = Bones[0].position + PostionFix;
- bone.rotation = Bones[0].rotation * RotationFix;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement