Jump to content


GSAP 3 drag and draw along path

Moderator Tag

Recommended Posts

Hi all!
This is my first time using the Draggable plugin. There are not many examples of its use. I took https://greensock.com/forums/topic/23831-gsap-3-drag-and-draw-along-path/ as an example, but my car is located much lower than the road.
The car must be driven along the road




See the Pen VwQaqeK by oleksii-reshetnik (@oleksii-reshetnik) on CodePen

Link to comment
Share on other sites

Hey there!


Your SVG markup is a little bit chaotic. With a rect element this works fine.

See the Pen vYdGwjv?editors=1010 by GreenSock (@GreenSock) on CodePen

You have a lot of inline transforms which will sometimes throw off calculations and shift where the element is. There are a lot of shapes making up the car too. I'd recommend simplifying it, running SVG's through SVGOMG, or even just saving the car out as an image and using an image tag in the SVG. A good clean starting point is always helpful!


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