Author Topic: ActiveAnimation.Play from the current animation state  (Read 3577 times)

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
ActiveAnimation.Play from the current animation state
« on: May 08, 2013, 02:15:25 AM »
Let's say the object is already at the end of animation A, if I call ActiveAnimation.Play(A) I don't want it to play A from the beginning but from the end (ie: nothing moves)

How do I do that?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ActiveAnimation.Play from the current animation state
« Reply #1 on: May 08, 2013, 02:24:35 AM »
Don't use ActiveAnimation for that. ActiveAnimation is for timeScale-independent UI animation. What you're trying to do should be done with just animation.Play.

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Re: ActiveAnimation.Play from the current animation state
« Reply #2 on: May 08, 2013, 02:33:24 AM »
I do want timeScale independent animation so that works perfectly. Also ActiveAnimation handles the active/inactive for me, which is perfect for what I do (hide unhide panels in a showy way)
What I want is to start with the last animation state if it's playing the same animation clip.
(and yes I know I can hack ActiveAnimation)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ActiveAnimation.Play from the current animation state
« Reply #3 on: May 08, 2013, 05:31:23 PM »
So before playing the animation, check to see if it's already playing.