Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
barrard

Motion Path on complete sets position to x=0 and y = 0

Recommended Posts

I'm using pixi.js and gsap together in my project.  GSAP handles animating my sprites along paths.  Most of the time it works fine, but sometimes my sprite jumps to `{x: 0, y: 0}` at the end of a path.  The example is using dummy data, but the issue happens thare as well.  Am I using the gsap.to() method correctly?  Thank you for any help!

See the Pen LYyqJwo?editors=1111 by barrard (@barrard) on CodePen

Link to comment
Share on other sites

Hey @barrard,

 

This thread will definitely help you: 

 

Happy tweening ...

Mikel

Link to comment
Share on other sites

 

Thanks Mikel,  I checked out the thread and copied the path to my codepen, seems to work fine and remains at the end of the path.
 But the other path you see the sprite jump back to  (0 ,0) at the end of the path, why doesn't it remain at the end?

 

See the Pen LYyqJwo by barrard (@barrard) on CodePen

 

The paths themselves aren't anything specific, but why does one box snap back to (0 ,0) and the other doesn't?

Thanks for any help!

 

  • Like 1
Link to comment
Share on other sites

Hi barrad!

 

Please standby while we look into this.

 

  • Like 2
Link to comment
Share on other sites

Thanks for the quick response Jack!  You read my mind lol.  I really appreciate all the hard work the team puts into  GSAP and the community, and  I'm so thankful to have access to  tools that make animating such a breeze. Thank you for the preview code as well, cheers!

  • Thanks 1
Link to comment
Share on other sites

7 hours ago, barrard said:

I really appreciate all the hard work the team puts into  GSAP and the community, and  I'm so thankful to have access to  tools that make animating such a breeze.

Aw, thanks @barrard. Nice to have you on board using the tools. 🙌

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