GearVRf icon indicating copy to clipboard operation
GearVRf copied to clipboard

Animations in reverse?

Open rahul27 opened this issue 8 years ago • 1 comments

Do we have an option to play animations in reverse?

For now the GVRRepeatMode options are ONCE, REPEATED and PINGPONG. Given that GVRRepeatMode.PINGPONG can do start to finish and finish to start. Would it be easy to add a new option for reverse?

This makes it convenient to create one animation and play it forward and reverse when needed instead of having 2 separate animations.

rahul27 avatar Mar 03 '16 19:03 rahul27

There are different ways to do that. I think we can consider a couple of things:

  1. Add speed and time as properties. Reverse can be done by setting speed to -1, and time to the last.
  2. An API may be added to set the reverse mode.

I think the repeat mode can still apply when you play an animation in reverse.

I've seen other animation engine doing this. I think it might be a cleaner design than adding REVERSE in the repeat mode.

danke-sra avatar Mar 03 '16 19:03 danke-sra