playMaker

Author Topic: Negative animation speed does not work  (Read 3926 times)

hardcoder

  • Playmaker Newbie
  • *
  • Posts: 1
Negative animation speed does not work
« on: January 08, 2016, 12:36:53 PM »
Hi,

We are trying to switch parts of the game from strictly code to Playmaker. First issue we hit is that we are unable to set a negative animation speed with Set Animation Speed action. Negative speeds are very useful for playing animations backwards, say "open" open animation opens a chest, the same animation played with -1 speed effectively plays close animation.

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Negative animation speed does not work
« Reply #1 on: January 09, 2016, 09:10:08 AM »
I just tried setting a negative animation speed and it worked.

Note that the animator has its own set of actions, maybe that's your issue?

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Negative animation speed does not work
« Reply #2 on: January 09, 2016, 10:51:02 AM »
I just tried it and it didn't work.  On a simple legacy animation of a cube moving across the screen.  Setting it to .5 will make the animation play at half-speed but setting it to -1 results in the cube not moving at all.

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Negative animation speed does not work
« Reply #3 on: January 09, 2016, 11:30:12 AM »
OK... some more info.

I tried it with 'Set Animation Speed' and it didn't work.  But if I use 'Animation Settings' and try the speed setting there with -1... it does work.  It plays the animation backwards over and over.

But here's where that gets flaky.  Since it was playing the animation backwards over and over... I wanted it to NOT loop. So I went back into the 'Animation Settings' and tried to set the Wrap Mode to 'Once'.  The pulldown will not let me choose 'Once'.  Each time I pick 'Once', it injects 'Clamp' into the slot.  Then I tried choosing 'Default', which I would have thought would default to whatever the animation clip was set to do natively.  But when 'Default' is active, the cube never moves from it's frame1 position.

So it can be made to play backwards, but not without looping over and over.

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Negative animation speed does not work
« Reply #4 on: January 09, 2016, 12:19:06 PM »
I think that's because you're trying to rewind an animation while it's at the start, so it has nowhere to go. That's not an issue when looped.

Try using the Set Animation Time action with normalized set to true and time  set to 1, and then play the animation with a negative speed.

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Negative animation speed does not work
« Reply #5 on: January 09, 2016, 07:24:34 PM »
Thank you for that tip!  That does indeed allow the reverse playback on a 'Set Animation Speed' action and on an 'Animation Settings' action.

Any idea why the Wrap Mode slot of Animation Settings action is not allowing me to choose 'Once' mode rather than 'Loop' mode?

Thanks again.