playMaker

Author Topic: Blend Animation bug WITH FIX!  (Read 3716 times)

Murcho

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 54
Blend Animation bug WITH FIX!
« 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);

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3998
  • Official Playmaker Support
    • LinkedIn
Re: Blend Animation bug WITH FIX!
« Reply #1 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.

MaDDoX

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 165
    • FluidPlay Studios
Re: Blend Animation bug WITH FIX!
« Reply #2 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.
--
Breno "MaDDoX" Azevedo
@brenoazevedo