Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
bastrix

Rotating to nearest point: TweenMax

Recommended Posts

Hey all,

 

I understand that TweenMax simulates flash behaviour and always rotates to the nearest point, but I'm having some problems in some ocassions, I'm not exactly sure why...

 

I have a movieclip that has an initial rotation of -161, I want it to rotate to 147.

 

Ok, so with some basic calculations give me the following:

 

A ClockWise ROTATION:

 

- Would take 308 degrees.

 

A CounterClockWise ROTATION:

 

- Would take 51 degrees.

 

However, when I rotate the movieclip it rotates ClockWise direction, which would take longer. What am I missing here?

 

What I did:

 

Placed a movieclip on canvas, set the rotation to -161 and then call this:

 

 TweenMax.to(arrow, 1, { rotation:147 });

 

Many thanks in advance.

Link to comment
Share on other sites

Ah ok I just realized I should have been using "shortRotation", but I still have one question, if I want to use transformMatrix and rotate to the nearest point, I would have to do the calculations myself right?

Link to comment
Share on other sites

Actually, transformMatrix will also recognize shortRotation :) Enjoy.

Link to comment
Share on other sites

Actually, transformMatrix will also recognize shortRotation :) Enjoy.

 

Thanks ! :)

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.
×