Advertisement
Guest User

SUPA DANGEROUS

a guest
Oct 20th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3.  
  4. [AddComponentMenu("Bone Container/Bone Container")]
  5. public class BoneContainer : MonoBehaviour
  6. {
  7.  
  8.     public Transform[] Bones = null;
  9.     public Vector3 PostionFix;
  10.     public Quaternion RotationFix = Quaternion.Euler(0, 0, 0);
  11.  
  12.     void Update()
  13.     {
  14.         foreach (Transform bone in Bones)
  15.         {
  16.             bone.position = Bones[0].position + PostionFix;
  17.             bone.rotation = Bones[0].rotation * RotationFix;
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement