Anim Component: Second layer animation not playing on trigger (setTrigger)

Hi everyone,

I’m having an issue with triggering an animation on a secondary layer using PlayCanvas’s Anim Component (Anim State Graph).

Setup:

  1. I have a Base Layer for movement (Idle, Walk, Run).

  2. I created a secondary layer for upper-body actions (Shooting / Attack).

  3. The secondary layer starts at an empty state (connected from START).

  4. There is a transition from empty to rifel shooting triggered by a parameter called shootTrigger (Type: Trigger).

  5. There is an exit transition from rifel shooting back to empty with Has Exit Time = true (Exit Time = 1).

In Script (PlayerLogic.js): When pressing Space, I call:

JavaScript

var anim = this.getAnimComponent();
if (anim) {
    if (anim.layers) {
        for (var i = 0; i < anim.layers.length; i++) {
            anim.layers[i].weight = 1.0;
        }
    }
    anim.setTrigger('shootTrigger');
}

The Problem: The console.log fires and confirms anim.setTrigger('shootTrigger') is executed, but the shooting animation never plays on the character model.

Am I missing a specific layer blending/mask setting, or do triggers need to be handled differently across multiple layers in the Anim Component?

Any guidance would be greatly appreciated!