zoukankan      html  css  js  c++  java
  • unity, Additive Animtion注意事项

    以下摘自官方文档:(http://docs.unity3d.com/Manual/AnimationScripting.html)

    Additive animations allow you to overlay the effects of one animation on top of any others that may be playing. When generating additive animations, Unity will calculate the difference between the first frame in the animation clip and the current frame. Then it will apply this difference on top of all other playing animations.

    Tip: When using Additive animations, it is critical that you also play some other non-additive animation on every transform that is also used in the additive animation, otherwise the animations will add on top of the last frame’s result. This is most certainly not what you want.

    其中包含三个要点:

    1,Additive动画第一帧是参考帧,其余帧与之求差值。也就是说对于Additive动画而言,各帧是什么样并无卵用,有用的是各帧与第一帧的差值。

    2,对于一个Transform,只对其播放Additive动画,可能产生非预期行为。正确的做法是在对一个Transform的某个属性P播放Additive动画的时候至少保证此Transform的属性P同时也在播放着某个非Additive动画,即Additive动画需要一个Base动画作为基础。

    3,Additive动画的animationLayer值要比相应的Base动画的animationLayer值大。(参考:http://answers.unity3d.com/questions/218370/basic-question-about-additive-animation.html)

    补充:

    经过试验,如果一个Transform的某属性P没有相应的Base动画,那么在此Additive动画开始播放时用代码强制设置此Transform的属性P第一帧的值也可以避免additive动画出现非预期行为。

    参考:

    http://forum.unity3d.com/threads/weird-additive-animation-behavior.40250/

    http://answers.unity3d.com/questions/218370/basic-question-about-additive-animation.html

  • 相关阅读:
    PHP 安装配置
    网络,进程 相关指令
    大数据之路:阿里巴巴大数据实践PDF下载
    计算机系统概论PDF下载
    计算机组成与体系结构性能设计PDF下载
    简明python教程PDF下载
    软件工程-实践者的研究方法PDF下载
    软件测试PDF下载
    设计模式解析PDF下载
    设计原本pdf下载
  • 原文地址:https://www.cnblogs.com/wantnon/p/5706984.html
Copyright © 2011-2022 走看看