Jump to content
Search Community

Rotation of motion asset

yukiii test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

I unfortunately do not know how to make a minimal demo with the assets that I have so I sincerely apologize for that. I will attach pictures and videos of my situation instead. 

 

It might be a little difficult to see, but in the Figma file, the piping bag is traveling in a specific direction around the board. However, the coding that I inputed in Visual Studio Code does not translate that on the Motion Path Plugin, as you can see in the video (which I hope does work). Is there a specific code to make the piping bag rotate in the direction that I would like?

 

tl.to("#piping-bag", {duration:20, motionPath:{path:"#motion-path", align:"#motion-path", autoRotate: true, alignOrigin:[0, 0.1]}, ease: "sine.inOut"});

This is the code I have written right now. 

 

I apologize if this does not make much sense. 

 

759939739_ScreenShot2021-12-04at1_31_49PM.thumb.png.a0b5b8689b86ee6af57c95537c2d57a4.png 

 

 

 

 

Link to comment
Share on other sites

  • Solution

Welcome to the forums, @yukiii. I'm not sure I understand your question, but if you want the element to rotate in the direction of the path, but you need to add a specific number of degrees to that (for example, if it was sideways), you can just set autoRotate to that value, like autoRotate: 90 or autoRotate: 180

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