ofxStateMachine icon indicating copy to clipboard operation
ofxStateMachine copied to clipboard

Request: example showing animated transitions between states

Open hamoid opened this issue 6 years ago • 1 comments

That's a topic that it's missing from most posts describing state machines: how to animate transitions.

One option is that the animated transitions themselves are states themselves. (stateGoingFromAtoB, stateGoingFromBtoA).

But I think there must be a more clever way to do that, because doing the above the states can grow exponentially.

Two references:

  • Thread dealing with animation of transitions: https://www.gamedev.net/forums/topic/684913-animation-state-machine-transitions-implementation/
  • Interrupting transitions: https://blogs.unity3d.com/2016/07/13/wait-ive-changed-my-mind-state-machine-transition-interruptions/

hamoid avatar Nov 26 '19 12:11 hamoid

As for the example, it would be great to have 3 states (R, G, B) and cross fading the color when transitioning between those 3 states.

hamoid avatar Nov 26 '19 12:11 hamoid