![](https://i-blog.csdnimg.cn/blog_migrate/3e505dde225ffa9dceb7ef10e9965603.png)
mecanim
Hi there,
嗨,您好,
we are looking into how Mecanim handles its default values and wondering if we should change it in the future.
我们正在研究Mecanim如何处理其默认值,并想知道将来是否应该更改它。
Let’s get a bit technical!
让我们来一点技术!
The way that Mecanim currently works is that if a “property”– position, rotation, scale, float, animator parameter etc. – is animated by an AnimationClip in an AnimatorState, it will always be controlled by the Animator. This means that when transitioning into some AnimatorState that does not have an AnimationCurve for that “property”, it will be forced to its default value.
Mecanim当前的工作方式是,如果“属性”(位置,旋转,比例,浮动,动画师参数等)由AnimatorState中的AnimationClip动画化,则它将始终由Animator控制。 这意味着,当过渡到没有针对该“属性”的AnimationCurve的某些AnimatorState时,它将被强制为其默认值。
About this approach:
关于这种方法:
Pros:
优点 :
Cons:
缺点 :
Do you see others pros and cons?
您看到别人的利与弊吗?
Our idea is to change the default behavior so that properties are not forced back to their default values when not animated. How does that sound?
我们的想法是更改默认行为,以便在不设置动画时不强制将属性恢复为默认值。 听起来怎么样?
We could then offer the option to force write back of default values (like the current behavior). We think of putting the option in the Animator itself. Do you have uses where you would like to have a finer level of control over this?
然后,我们可以提供强制回写默认值(如当前行为)的选项。 我们考虑将选项放在Animator中。 您是否希望在其中使用一些更好的控制方法?
Thanks for your time!
谢谢你的时间!
翻译自: https://blogs.unity3d.com/2014/05/30/mecanim-and-default-values/
mecanim