Jump to content
Search Community

legacy bezier behavior

eigenface test
Moderator Tag

Recommended Posts

A while back, I made a flash app using gs v10, using bezier tweens.  Recently, I recompiled it for some necessary maintenance, using gs v12.  The bezier tweens are messed up - the sprites being tweened don't orient to the curves, and sequences of bezier tweens that used to flow smoothly one into the next now make the sprite suddenly jump from one angle to a different angle when one tween stops and the next one starts.  I've tried testing out all the new bezier settings (including type:"thruBasic"), trying to recreate the behavior of the v10 tweens, but I can't figure out how.  Is there a way?  My original tween code looked like this:

 

TweenMax.to(this, pathTime, { x:endPoint.x, y:endPoint.y, bezier:pathObjArray, orientToBezier:true, ease:Linear.easeNone, onComplete:onComplete });

 

where pathObjArray.length == 2.

 

What code should I use to recreate the same behavior as closely as possible in v12?

Link to comment
Share on other sites

Did you by any chance change whether or not the end point is supposed to be included in the bezier point array?  I ask because even though my point array has 2 points, when I use type:"quadratic", I get an error which looks like it's due to not having enough bezier points.  Adding the end point to the bezier point array causes even weirder behavior, though.  I'm just taking shots in the dark here as to how the bezier tween has changed from v10 to v12, it would be nice to have a "canonical" translation.

Link to comment
Share on other sites

Oops, posted at the same time.  Thanks for the help.  For future reference, the correct code is:

 

TweenMax.to(this, pathTime, { bezier:{ values:pathObjArray, autoRotate:true, type:"soft" }, ease:Linear.easeNone, onComplete:onComplete });

 

where pathObjArray.length == 3 because the endPoint values have been added to the end of values:pathObjArray.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...