Jump to content
Search Community

Items animated along bezier curves slow down at the end of the curve

looeee

Go to solution Solved by Carl,

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

Posted

When I'm animating along a bezier curve, the object being animated slows down towards the end of the curve - you can see this very clearly in the attached Codepen which draws a series of dot along the curve to visualize it.  The dots are more tightly clustered towards the end of the curve. 

Is there any way of changing this? I've tried changing the timeResolution but it doesn't fix this. 

See the Pen KdbqEp by looeee (@looeee) on CodePen.

  • Solution
Posted

Nice tool. I haven't had a lot of time to investigate it but to answer your question you just need to use a Linear ease on your tween like

 

 

let move = TweenMax.to(goose.elem, config.animSpeed, {
bezier:{
type: config.type,
timeResolution : config.timeResolution,
values:  bezier, 
ease: config.ease, 
autoRotate: config.autoRotate,
}, 
        ease:Linear.easeNone
});
 
All tweens use a Power1.easeOut ease by default.
  • Like 3
Posted

Ah, I put the ease inside the bezier definition! Haha, I spent 30 minutes trying to fix this without noticing! 

Thanks, that fixed it. 

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