Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: rechronicle on September 12, 2019, 08:36:12 AM

Title: Animator Send Event Sometimes not Triggering?[SOLVED]
Post by: rechronicle on September 12, 2019, 08:36:12 AM
Hello,
I am using the 'SendEvent' function from animator to tell that the animation is complete. But sometimes it doesn't fire and resulting in messing up with the animation flow. Is there an alternative way to know that the animation is ended?

I've tried to put the trigger millisecond before the end of the animation, but it still not triggering sometimes.


Thank you!
Title: Re: Animator Send Event Sometimes not Triggering?
Post by: jeanfabre on September 13, 2019, 01:17:32 AM
Hi,

 that's very odd indeed, is it 100% reproduceable? can you isolate the animation in an empty scene with just the animation? if yes, can you send it to me?

 Animations are very reliable, so could it be that in your fsm, you are not listening to the event at the time it's sent? maybe you did not plugged the sendevent properly, is it targeting the right fsm? is the gameobject/fsm enabled ?

bye,

 Jean
Title: Re: Animator Send Event Sometimes not Triggering?
Post by: djaydino on September 14, 2019, 04:52:02 AM
Hi.
I can confirm that send even is not 100% reliable with animation events.

Tested with spritesheet animation with 45 sample rate.

The 'animation event' sends a event, and in that state i send an event to another fsm on a different object.

It seemed to happen sometimes when many windows are open (giving lag the the gameplay)

Instead i use 'Set State' now (with target state name) which seems to work 100% (so far)
Title: Re: Animator Send Event Sometimes not Triggering?
Post by: rechronicle on September 14, 2019, 08:31:59 AM
Hello,
I think I found the culprit, my bad. Just like Jean said, my 'listener' FSM isn't listening at the time when animation event triggers.

I manage to fix it by using a global transition for the animation event trigger. It's working fine for now.

Haven't tested it yet with multiple/crowded animations like djaydino doing. Will let you know if I found something.


Thanks!