Hey everyone,
Image you have a cartoony chess game. And you're sliding the queen from one end of the board to the other. I want to add a teetering effect, with the piece pivots on it's base a bit to begin it's slide, and then teeters in the other direction when it ends.
I have the pivot centre at the bottom center, but I can't seem to find an elegant way to pivot back and forth. So what I've done is:
var maxTilt:Number = 10; // degrees
var slide:TimelineLite = new TimelineLite( { autoDispose:true } );
slide.add(TweenMax.to(obj, DURATION / 4, { rotation: -maxTilt} ));
slide.add(TweenMax.to(obj, DURATION / 2, { rotation: maxTilt } ));
slide.add(TweenMax.to(obj, slide.add(TweenMax.to(obj, DURATION, { startAt: { x:from.x, y:from.y }, x:to.x, y:to.y, ease: Back.easeInOut.config(1.0) } ), 0);
DURATION / 4, { rotation: 0} ));
Problem is the nice ease effects can't be transitioned between the tils. Is the best way to do this? I hope not.
Thank you!
Mark