简体   繁体   English

有没有办法在 Unity 中部分地为精灵设置动画

[英]Is there a way to animate a sprite partially in Unity

I plan on animating my 2D characters in unity However, their actions are multi-dimensional, so they could, as an example, be walking at the same time as looking up or firing their gun, each animation would target one part of the sprites and if possible be independent.我计划统一动画我的 2D 角色 然而,他们的动作是多维的,所以作为一个例子,他们可以在走路的同时抬头或开枪,每个动画都会针对精灵的一部分,如果可能的话,保持独立。

the sprite sheet would be far too big to present every possible animation combination, so is there a way to animate parts of a sprite individually?精灵表太大而无法呈现所有可能的动画组合,那么有没有办法单独为精灵的各个部分设置动画?

There is an official Unity Package which supports 2D character rigging and other advanced features such as sprite swapping: https://docs.unity3d.com/Packages/com.unity.2d.animation@2.2/manual/index.html有一个官方的 Unity 包,支持 2D 角色绑定和其他高级功能,例如精灵交换: https : //docs.unity3d.com/Packages/com.unity.2d.animation@2.2/manual/index.html

Be aware that it is still marked as being in preview请注意,它仍被标记为处于预览状态

You could try creating the parts you want to move independently as separate gameobjects.您可以尝试将要独立移动的部分创建为单独的游戏对象。 Then use the buit-in animator to create your aminations or use scripts to transform/translate/rotate parts.然后使用内置动画制作器创建动画或使用脚本来转换/翻译/旋转零件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM