例如当一个【骨骼A】位置从0—100时,【骨骼B】的缩放也会跟着从0-100
实际项目中这样的骨骼B实际上可能会有数个,而且可能会映射到不同的地方,例如多个部件的透明度(alpha),因此逐一的进行K帧会让动画的关键帧越来越复杂。
如果是AE我可能会打上表达式以此来解决,不过spine软件内部是没有这样东西的,虽然引擎里似乎有办法可以通过代码解决不过我是纯动画用途.
在spine里我暂时只能想到一些比较笨的解决方案,例如专门做一个用来和【骨骼A】对应数值的【骨骼C】,然后其他需要做映射的骨骼约束到这个【骨骼C】的缩放,但这也无法解决透明度依然需要做重复工作的问题
如何关联两个不相关的数值
loneprison 先做好骨骼b的动画,再复制骨骼b[ctrl+d],可以连带动画一起复制,然后错帧调整就行了
loneprison Am I correct in understanding that your problem does not necessarily need to be solved in the editor? I think there are several ways to control it from within the script at runtime. For example, this is an example that actually comes with the spine-unity runtime, but you can create an animation where the gauge fills from 0 to 100, and by changing the animation time of the gauge using Timeline API when the character is attacked, you can implement a UI where the gauge decreases each time the character is attacked. Similarly, I think it would be possible to create a separate translate 0-100 animation and a scale 0-100 animation, and then when the animation time reaches the translate 50, change the time of the scale animation, which plays on a separate track, to the scale 50 time so that they are linked. Will this approach work for your problem? If not, please tell us more about the conditions of what you want to achieve.
Misaki 实际效果理解对了,但我说的是仅在编辑器内实现的话...这样似乎是只能多K一些关键帧来解决的吗
yugutou 实际情况是比方说A骨骼旋转0-20,然后BCD骨骼分别是【缩放1-1.1】【位置0-100】【透明度255-0】,这种完全不同的值单右需要相互映射,如果只是做单一动作其实还好,但如果说要做一组复杂的切换的话,部件又足够多,做也是能做,就是对精力要求会成倍增加
loneprison I see, to achieve this within the editor, it is certainly only possible by adding the appropriate keys as you mentioned. There has been an idea on our roadmap for a long time to be able to constrain different transforms with transform constraints, but it has not been realized yet:
EsotericSoftware/spine-editor121
You can subscribe to this issue ticket to receive notifications when there is any progress on this issue.
Misaki 根据这个Issues我可以理解为这是一个开发中的功能吗,那么我就期待的等着功能上线吧.
不过有一点似乎是没有被提到的,所以还是想要强调的,多个插槽的颜色希望还是可以联动一下.
举一个实际案例是,一个复杂一点的原画插图,眼睛可能会有十几个图层,而如果要为此切换两种眼睛的状态,就需要在同一时刻切换数十个插槽颜色.
如果插槽也有类似【变换约束】这样的约束/联动功能的话,就可以更方便的做到这一效果,最重要的是这样不容易因为工程过于复杂而晕头转向了
loneprison Oh, actually, that idea is also already on our roadmap:
EsotericSoftware/spine-editor347
The issue ticket mentions an idea called "SlotColorConstraint", a constraint to link slot colors.
I have added the url of this thread as a comment on the issue.