Share Posted May 10, 2022 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 Thanks! See the Pen VwQaqeK by oleksii-reshetnik (@oleksii-reshetnik) on CodePen Link to comment Share on other sites More sharing options...
Share Posted May 10, 2022 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!https://jakearchibald.github.io/svgomg/ 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now