Default idle animation playing when swapping weapons instead of the weapon idle animation

Adam Rory

New member

You can hopefully in the video see that it looks like it goes through the equip or unequip animation properly but then some value is incorrect that send it to the default idle instead of the weapon specific idle animation. When I am in the bad state I can swing the weapon but it always goes back to the bad idle state. If I aim with the weapon it will then transition to the correct idle. I believe this is because in the transition from Aim state to Idle state I am satisfying the conditions properly but the transition from Any State to Idle the conditions are not met. I have notice that the Slot0ItemIndexStateChange trigger does not enable properly so I suspect this is ultimately the cause of my issue, however after some debugging the Set Trigger call is being hit. Since the SetTrigger is taking in a hash value it is difficult to be sure that the value is correct but I did check the hash creating call and the string provided does look correct and no changes have been made to the animator. It should also be noted that the Slot1 trigger looks as if it is operating properly.

FYI: I am using the demo First Person Arms animator without modification, we have put a new mesh on the Nolan FPArms rig

Thank you in advance for your support.
 

Justin

Administrator
Staff member
It looks like the ItemID is changing but there is no equip/unequip. Because you aren't using a full body character I think that it may be related to this:

 

Adam Rory

New member
Hey Justin,

Thanks for your reply, I did see that other post before I made mine and made sure to go back through and test that fix. I created a video using the duration instead of the Wait for Event and even though I now see both the 4 & 5 index log correctly when swapping weapons once the animation finishes it still transitions to the default idle animation instead of the weapon specific. Something I noticed, although I did not capture it in the video, is that once I am sitting on the default anim if I click the Slot0ItemStateIndexChange trigger in the Animator Parameters list the animation will transition immediately to the correct idle state.

After troubleshooting this with your suggestion, it has come down to an issue with the Slot0ItemStateIndexChange trigger. The only time I ever see that Slot 0 trigger get set is if I spam the Aim button, which is odd because that button should only be triggering Slot 1 not 0.

 

Justin

Administrator
Staff member
Tagging @Sarah so she can take a look at it. What is your MovementSetID set to for the item? For melee weapons this should be set to 1.

which is odd because that button should only be triggering Slot 1 not 0.
Slot 0 should be correct. Slot 0 is for the right hand, whereas Slot 1 is for the left. Do you have all of the items using slot 0?
 

Sarah

Administrator
Staff member
Are all of your transitions to and from Idle correct? I would check that the Idle -> Exit transition is correct so that it isn't transitioning out too early.

Are you using the demo animations? If not make sure Idle is set to looping.
 

Adam Rory

New member
@Justin All of my weapons are in the right hand and set to Slot 0. They MovementSetID is set to 1.

@Sarah I am using the same animator as Nolan FP arms, I did double check that the animations are set correctly and idles are set to looping. Once I force myself into the correct idle animation either by aiming or clicking the trigger parameter in the editor everything works as expected. What could be causing the IndexStateChange trigger to not be set?
 

Adam Rory

New member
Hmm...so I stumbled across something that fixes the issue but I am not sure if it is the correct fix or not. On the Aim Item Ability the 'Activate In First Person' flag was false. Turning that on fixes my issue, does that makes sense or is it a workaround?

1585632481252.png
 

Justin

Administrator
Staff member
Ahh.. good catch. Yes, it does! There are some transitions which check for the aim parameter so having it active within first person is a good change.
 
Top