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

  • 相关阅读:
    XSS之防御与绕过
    说说XXE漏洞那些事
    常见web中间件漏洞(五)weblogic漏洞
    DLL劫持漏洞
    常见web中间件漏洞(四)Tomcat漏洞
    常见web中间件漏洞(三)Nginx漏洞
    CNVD-2021-14536 锐捷 RG-UAC 统一上网行为管理审计系统信息泄露漏洞
    Jupyter安装并设置反向搭理
    读书-刑罚的历史
    读书-反常识
  • 原文地址:https://www.cnblogs.com/wantnon/p/5706984.html
Copyright © 2011-2022 走看看