Share Posted January 2, 2013 I'm trying to use BezierPlugin to make my Starling sprite follow a bezier path and have it orient to the path. I'm using the following code... TweenMax.to(mc, 3, {bezier:[{x:209, y:126}, {x:149, y:348}, {x:300, y:345}], orientToBezier:true}); ...but my sprite rotates violently around it's pivot point and not along the path. Any thoughts? Thanks! -Shane Link to comment Share on other sites More sharing options...
Share Posted January 2, 2013 I believe the issues is that Starling uses radians for rotation instead of degrees. I assume you're using v11.x of TweenMax - the orientToBezier:true assumes degrees. I highly recommend that you upgrade to using v12 so that you can tap into the much improved BezierPlugin which allows you to use radians. "orientToBeizer" has been renamed "autoRotate" and you can optionally pass an array of values that control the rotation. See the docs at: http://api.greensock.com/as/com/greensock/plugins/BezierPlugin.html For example, your tween may look like this: TweenMax.to(mc, 3, {bezier:{values:[{x:209, y:126}, {x:149, y:348}, {x:300, y:345}], autoRotate:[color=#000000][font='Lucida Console', 'Courier New', Courier, monospace][size=3]["x","y","rotation",0,true][/size][/font][/color]}}); But again, this assumes you're using v12 of TweenMax which you can read about at http://www.greensock.com/v12/ There's some more info about the new BezierPlugin at http://forums.greensock.com/topic/6395-poll-bezierplugin-new-features-and-types/ Does that clear things up? Link to comment Share on other sites More sharing options...
Author Share Posted January 2, 2013 Cool man! I'll look into that. Thanks again for being awesome! -Shane Hoffa Link to comment Share on other sites More sharing options...
Share Posted September 12, 2013 Cool man! I'll look into that. Thanks again for being awesome! -Shane Hoffa I also encountered the same problem, did you solve it? Please email me see 457636876@QQ.com Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now