当前位置: 首页>>代码示例>>C#>>正文


C# UMAData.ChangeBoneScale方法代码示例

本文整理汇总了C#中UMAData.ChangeBoneScale方法的典型用法代码示例。如果您正苦于以下问题:C# UMAData.ChangeBoneScale方法的具体用法?C# UMAData.ChangeBoneScale怎么用?C# UMAData.ChangeBoneScale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UMAData的用法示例。


在下文中一共展示了UMAData.ChangeBoneScale方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateUMAFemaleDNABones


//.........这里部分代码省略.........

        umaData.boneList["LipsInferiorAdjust"].boneTransform.localPosition = umaData.boneList["LipsInferiorAdjust"].actualBonePosition + new Vector3(
        Mathf.Clamp(0, -0.05f, 0.05f),
        Mathf.Clamp(0, -0.05f, 0.05f),
        Mathf.Clamp(0 + (umaDna.lipsSize - 0.5f) * -0.008f, -0.1f, 0.1f));

        umaData.boneList["LeftLipsAdjust"].boneTransform.localPosition = umaData.boneList["LeftLipsAdjust"].actualBonePosition + new Vector3(
        Mathf.Clamp(0, -0.05f, 0.05f),
        Mathf.Clamp(0 + (umaDna.mouthSize - 0.5f) * 0.03f, -0.02f, 0.005f),
        Mathf.Clamp(0, -0.05f, 0.05f));
        umaData.boneList["RightLipsAdjust"].boneTransform.localPosition = umaData.boneList["RightLipsAdjust"].actualBonePosition + new Vector3(
        Mathf.Clamp(0, -0.05f, 0.05f),
        Mathf.Clamp(0 + (umaDna.mouthSize - 0.5f) * -0.03f, -0.005f, 0.02f),
        Mathf.Clamp(0, -0.05f, 0.05f));

        umaData.boneList["LeftLipsSuperiorMiddleAdjust"].boneTransform.localPosition = umaData.boneList["LeftLipsSuperiorMiddleAdjust"].actualBonePosition + new Vector3(
        Mathf.Clamp(0, -0.05f, 0.05f),
        Mathf.Clamp(0 + (umaDna.mouthSize - 0.5f) * 0.007f, -0.02f, 0.005f),
        Mathf.Clamp(0, -0.05f, 0.05f));
        umaData.boneList["RightLipsSuperiorMiddleAdjust"].boneTransform.localPosition = umaData.boneList["RightLipsSuperiorMiddleAdjust"].actualBonePosition + new Vector3(
        Mathf.Clamp(0, -0.05f, 0.05f),
        Mathf.Clamp(0 + (umaDna.mouthSize - 0.5f) * -0.007f, -0.005f, 0.02f),
        Mathf.Clamp(0, -0.05f, 0.05f));
        umaData.boneList["LeftLipsInferiorAdjust"].boneTransform.localPosition = umaData.boneList["LeftLipsInferiorAdjust"].actualBonePosition + new Vector3(
        Mathf.Clamp(0, -0.05f, 0.05f),
        Mathf.Clamp(0 + (umaDna.mouthSize - 0.5f) * 0.007f, -0.02f, 0.005f),
        Mathf.Clamp(0 + (umaDna.lipsSize - 0.5f) * -0.008f, -0.1f, 0.1f));
        umaData.boneList["RightLipsInferiorAdjust"].boneTransform.localPosition = umaData.boneList["RightLipsInferiorAdjust"].actualBonePosition + new Vector3(
        Mathf.Clamp(0, -0.05f, 0.05f),
        Mathf.Clamp(0 + (umaDna.mouthSize - 0.5f) * -0.007f, -0.005f, 0.02f),
        Mathf.Clamp(0 + (umaDna.lipsSize - 0.5f) * -0.008f, -0.1f, 0.1f));

        //Bone structure change
        umaData.ChangeBoneScale("Global",
        new Vector3(
        Mathf.Clamp(1 + (umaDna.height - 0.5f) * 1.0f + (umaDna.legsSize - 0.5f) * 1.0f, 0.5f, 3.0f),
        Mathf.Clamp(1 + (umaDna.height - 0.5f) * 1.0f + (umaDna.legsSize - 0.5f) * 1.0f, 0.5f, 3.0f),
        Mathf.Clamp(1 + (umaDna.height - 0.5f) * 1.0f + (umaDna.legsSize - 0.5f) * 1.0f, 0.5f, 3.0f)));

        umaData.ChangeBoneMoveRelative("Position", new Vector3(
        Mathf.Clamp((umaDna.feetSize - 0.5f) * -0.27f, -0.15f, 0.0675f),
        Mathf.Clamp(0, -10, 10),
        Mathf.Clamp(0, -10, 10)));

        umaData.ChangeBoneScale("LowerBack",
        new Vector3(
        Mathf.Clamp(1 - (umaDna.legsSize - 0.5f) * 1.0f, 0.5f, 3.0f),
        Mathf.Clamp(1 - (umaDna.legsSize - 0.5f) * 1.0f, 0.5f, 3.0f),
        Mathf.Clamp(1 - (umaDna.legsSize - 0.5f) * 1.0f, 0.5f, 3.0f)));

        umaData.ChangeBoneScale("Head",
        new Vector3(
        Mathf.Clamp(1 + (umaDna.headSize - 0.5f) * 2.0f, 0.5f, 2),
        Mathf.Clamp(1 + (umaDna.headSize - 0.5f) * 2.0f, 0.5f, 2),
        Mathf.Clamp(1 + (umaDna.headSize - 0.5f) * 2.0f, 0.5f, 2)));

        umaData.ChangeBoneScale("LeftArm",
        new Vector3(
        Mathf.Clamp(1 + (umaDna.armLength - 0.5f) * 2.0f, 0.5f, 2.0f),
        Mathf.Clamp(1 + (umaDna.armLength - 0.5f) * 2.0f, 0.5f, 2.0f),
        Mathf.Clamp(1 + (umaDna.armLength - 0.5f) * 2.0f, 0.5f, 2.0f)));
        umaData.ChangeBoneScale("RightArm",
        new Vector3(
        Mathf.Clamp(1 + (umaDna.armLength - 0.5f) * 2.0f, 0.5f, 2.0f),
        Mathf.Clamp(1 + (umaDna.armLength - 0.5f) * 2.0f, 0.5f, 2.0f),
        Mathf.Clamp(1 + (umaDna.armLength - 0.5f) * 2.0f, 0.5f, 2.0f)));
开发者ID:stoddy2hotty,项目名称:UMA,代码行数:67,代码来源:HumanFemaleDNAConverterBehaviour.cs


注:本文中的UMAData.ChangeBoneScale方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。