[SOLVED] Anim upper-body layer (on/off)

Hi there, we’re working on a shooter where the player can swap between many different weapons. To keep animations down we use the new anim layer system where weapons are controlled in a separate layer for the upper body. Masking is not available yet, but on start-up we simply remove the anim curves that we don’t want to override. So that when you have a weapon, you run the upper body layer on top of the regular base layer run/walk/idle/strafe animations. After some experimenting it now works fine.

But one thing I haven’t figured out is how to turn a layer on/off: when you have no weapon, I see no way to disable the upper-body layer so the base layer can affect the arms again. (I see no “enabled” flag on layers. Changing to an animation with no curves does not work, the bones will stay in the last upper body position. Transitioning to “end” state does not do it either, that’s not what it’s for, it will start again.)

The best solution would be a blend weight on the entire layer just to be able to blend in and out, but a hard toggle on/off would also do.

I know Anim is work in progress, but would be nice if there was a work-around until everything is final. Or maybe I missed something?

@Elliott Could you help here please? :slight_smile:

Hi @Snupty , the current layer system was designed to support multiple independant animation graphs on a single game object (for instance locomotion and facial animations). You’re right in saying that the best solution would be a blend weight, which is something that’ll be introduced with layer masks (which is planned to be worked on in the coming weeks). For now, have you tried resetting the upper body layer? This should remove all the currently playing animations from the upper body system and allow any animation curves from the full body layer to surface.

1 Like

Hi @Elliott I will try that, thanks

I can confirm that this works, thanks a lot!