Jump to content

Key Parker

Autorotate on a motion path causing alignment issues

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts



I am trying to animate a shape along a motionpath bezier. In my codepen have taken it back to basics with a line and a square.

Whenever I switch autorotate to true, the square just does not stay centred on the line.

Turn autorotate to false and it sticks beautifully. But I need that auto rotation goodness.


I have been using the demo from https://greensock.com/docs/Plugins/MorphSVGPlugin 'Animate along an SVG path' for the basis of the animation.

See the Pen VWEwRa?editors=1010 by freemagee (@freemagee) on CodePen

Link to comment
Share on other sites

That is fantastic.


I have applied what you have to pointed out to my 'real' animation.

You have made a random stranger very happy on a Saturday afternoon.


Thank you.


See the Pen weEYma by freemagee (@freemagee) on CodePen


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