示例#1
0
        public Vector3 GetBoneLocation(int index, ECgBoneSpaces space = ECgBoneSpaces.World)
        {
            if (index >= Bones.Count)
            {
                return(Vector3.zero);
            }

            return(space == ECgBoneSpaces.World ? Bones[index].position : Bones[index].localPosition);
        }
示例#2
0
        public Vector3 GetBoneLocation(string name, ECgBoneSpaces space = ECgBoneSpaces.World)
        {
            Transform bone;

            BoneNameMap.TryGetValue(name, out bone);

            if (bone != null)
            {
                return(space == ECgBoneSpaces.World ? bone.position : bone.localPosition);
            }
            return(Vector3.zero);
        }