Version: 5.6
Вложенные конечные автоматы
Функциональность Solo и Mute

Слои анимации

Unity использует слои анимации (Animation Layers) для управления сложной машиной состояний для различных частей тела. Например, вы можете иметь слой нижней части тела для ходьбы / прыжков и слой верхней части тела для бросания / стрельбы.

You can manage animation layers from the Layers Widget in the top-left corner of the Animator Controller.

Clicking the gear wheel on the right of the window shows you the settings for this layer.

Вы можете добавить новый слой нажав значок + в виджете. Для каждого слоя вы указываете маску тела (часть тела к которой будет прикладываться анимация) и тип смешивания. Замещение (Override) означает, что информация из других слоев будет проигнорирована, а сложение (Additive) означает что анимация будет добавлена поверх предыдущего слоя.

You can add a new layer by pressing the + above the widget.

Свойство Mask применяется для указания маски тела используемой на данном слое. Например, если вы хотите использовать верхнюю часть тела для анимации броска в то время ка ваш персонаж идет или бежит, вы будете использовать маску тела подобную этой:

An ‘M’ symbol is visible in the Layers sidebar to indicate the layer has a mask applied.

Для дальнейшего изучения масок тела аватара вы можете почитать эту секцию

Синхронизация слоев анимации

Иногда полезно использовать части машины состояний на разный слоях. Например вы хотите симулировать поведение раненного и имеете анимации походки / бега / прыжка раненного вместо анимаций “здорового”. Вы можете щелкнуть флажок Sync на одном из ваших слоёв и затем выбрать слой с которым вы хотите провести синхронизацию. Структура машины состояний будет той же самой, но фактические клипы анимации, используемые в состояниях, будут различны.

This means the Synced layer does not have its own state machine definition at all - instead, it is an instance of the source of the synced layer. Any changes you make to the layout or structure of the state machine in the synced layer view (eg, adding/deleting states or transitions) is done to the source of the synced layer. The only changes that are unique to the synced layer are the selected animations used within each state.

The Timing checkbox allows the animator to adjust how long each animation in synced layers takes, determined by the weight. If Timing is unselected then animations on the synced layer will be adjusted. The adjustment will be stretched to the length of the animation on the original layer. If the option is selected the animation length will be a balance for both animations, based on weight. In both cases (chosen and not chosen) the animator adjusts the length of the animations. If not chosen then the original layer is the sole master. If chosen, it is then a compromise.

In this view, the Fatigued layer is synced with the base layer. The state machine structure is the same as the base layer, and the individual animations used within each state are swapped for different but appropriate equivalent animations.
In this view, the “Fatigued” layer is synced with the base layer. The state machine structure is the same as the base layer, and the individual animations used within each state are swapped for different but appropriate equivalent animations.

An ‘S’ is symbol is visible in the Layers sidebar to indicate the layer is a synced layer.

Вложенные конечные автоматы
Функциональность Solo и Mute
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961