Jump to content
Search Community

Animating an object that itself is moving along a path

CarpeDiem test
Moderator Tag

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 don't know if I can explain this correctly but I'll give it a try.  There is something I routinely did in flash that i can't figure out how to do in html5/javascript.   Let's say i have an image of a football and it is moving from point A to point B, it could even be moving along a curved path which I know how to do.  BUT, as this football is moving from point A to B, i want it also to be rotating so it looks like it is sort of spinning as it hurls itself through the air.  In flash.  I accomplished this using a real hack solution.  I just made an animated gif of said football and then moved it from point A to point B but there must be a better way.


If this makes sense to anyone and you can help, I'd appreciate it. 

Link to comment
Share on other sites

Welcome to the HTML/JS forums :) Nice to see that you've got some Flash experience from the old days. 


I might be misunderstanding your question, but wouldn't it be as simple as adding a rotation to your tween? Like rotation:360 or rotation:720 or something? 


If that doesn't help, please provide a reduced test case (codepen or jsfiddle) and we'd be happy to take a peek and offer some suggestions. 


Happy tweening!

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