Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: Murcho on April 30, 2011, 10:20:48 PM

Title: Blend Animation bug WITH FIX!
Post by: Murcho on April 30, 2011, 10:20:48 PM
So the Blend Animation action doesn't take the animation speed into consideration when firing the animation done event.  It is however a quick fix, just replace the code here :
Code: [Select]
if (finishEvent != null)
delayedFinishEvent = new DelayedEvent(Fsm, finishEvent, anim.length);

with

Code: [Select]
if (finishEvent != null)
delayedFinishEvent = new DelayedEvent(Fsm, finishEvent, anim.length / anim.speed);
Title: Re: Blend Animation bug WITH FIX!
Post by: Alex Chouls on May 01, 2011, 09:37:48 PM
Actually looking at this action again, it seems like it should be based on the blend time:

Code: [Select]
delayedFinishEvent = new DelayedEvent(Fsm, finishEvent, time.Value);
The finish event doesn't really have anything to do with the animation length - it should trigger when the blend is finished.
Title: Re: Blend Animation bug WITH FIX!
Post by: MaDDoX on May 02, 2011, 07:14:08 PM
Hmm.. considering the transition duration is actually affected by the current game speed (IIRC, it does) it really depends on what the designer/artist wants. In that case probably having the option would be best.