Jump to content
Search Community

Scroll trigger not follow the current scroll

TCO

Go to solution Solved by mvaneijgen,

Recommended Posts

Posted

Hi,


As you can see on the Codepen, I try to move the green object when it touch the blue trigger but during the animation, the green object move too fast compared to the blue trigger.

 

How can I fix that? 

 

Thanks!

Capture d’écran 2022-10-21 à 11.19.42.png

See the Pen LYmwNoJ by thibautcollin-be (@thibautcollin-be) on CodePen.

  • Solution
Posted

Every tween gets a default ease: "power1.out" which will make it move fast and then slow down at the end. With scrolling animation you don't really want that, so I always like to make a mental note to set ease: "none"  when animating something on scroll 

 

See the Pen ZEogOyr by mvaneijgen (@mvaneijgen) on CodePen.

  • Like 1
  • Thanks 1

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