Jump to content
GreenSock

JoePham

Hi How can i Overwrite the Rotation ?

Recommended Posts

Hi everyones

I got stuck at the rotation 

so my question is how can i Overwrite the rotation ? ?? 

please go to the Codepen 

dont know only show the mobile version ... 

thanks for your time ! 

See the Pen ZEvZjeM by phm-thanh-li-m-the-animator (@phm-thanh-li-m-the-animator) on CodePen

Link to comment
Share on other sites

I'm not sure what you're trying to do exactly, but you set up your animation to autoRotate via the motionPath and you're ALSO trying to create an entirely new animation of rotation on EVERY tick during that animation. That's definitely not a good idea. Not only is it wasteful to create a new animation on every tick, but you've got multiple animations telling the rotation to go to DIFFERENT values (conflicting). You should decide which you want to do. Maybe delete the autoRotate on the motionPath. Or you could wrap the element in a container, so the motionPath affects the container, and the other rotation affects the inner element. 

 

If you still need help, please clarify your intentions and only provide a minimal demo - you don't need most of that code and the elements in that demo to show the issue. The simpler your demo, the more likely you'll get a good answer. 

 

Good luck!

  • Like 1
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.
×