Jump to content
Search Community

How do I rotate my van to be the right way up?

Will Simons test
Moderator Tag

Go to solution Solved by Trapti,

Recommended Posts

I've been experimenting with motion paths and when I draw the path from left to right, the van is the right way but... stuck in reverse.

When the motion path is drawn from right to left, the van is upside-down AND stuck in reverse.

Can anyone explain this?

Second, I'd like the van to be the right way up and moving from right to left.

Can anyone help with this?

See the Pen BaVzRpX by willsi (@willsi) on CodePen

Link to comment
Share on other sites

I think this article from our own @PointC will really clearly illustrate your issue/solution.

 

https://www.motiontricks.com/adobe-illustrator-path-direction-quick-tip/

 

1 hour ago, Trapti said:

we  cannot reflect using CSS

 

@Trapti  you can reflex using CSS, with transform: scaleX(-1) scaleY(-1), but in this case it is not a good idea, because you don't want GSAP and CSS transforming the same property. 

  • Like 2
Link to comment
Share on other sites

K, thank you both. I followed Trapti's advice and reversed the SVG, which got the van moving in the right direction. However, it's not quite right as it needed an additional step, which is that I had to comment out 'autoRotate' to make it work. Is there a solution that allows me to reinstate autoRotate?

Link to comment
Share on other sites

In my pen autoRotate was commented out. 
If the solution is working for you then use that. autoRotate will rotate the object according to paths coordinates. You can choose to give numbers also like 90 or 180 how much ever you want to rotate. If it is set to "true" then gsap automatically figures out the amount of rotation it needs. 

Keeping "autoRotate: true"  looks good in your case, so I uncommented that now in my pen. 
 

 

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