Share Posted September 7, 2022 I just took the GSAP Horizontal Scroll pen with ScrollTrigger, and I added ScrollSmoother and this works perfectly. And also I have a requirement to do draggable the horizontal section, so for that I used the Observer plugin to use the onDrag function to update the scroll() of the main ScrollTrigger. So, this also works fine, but I wanna reach a smooth movement on the drag, like a ('lerp' ,'momentum', 'inertia') as when I scroll, but I can't reach. Any suggestions are welcome. I did this to update the scroll value of the ScrollTrigger. Observer.create({ target: ".container", type: "wheel,touch,pointer", onDrag: (self) => { scrollTween.scrollTrigger.scroll( scrollTween.scrollTrigger.scroll() - self.deltaX ); } }); Thanks so much! See the Pen GRdJazK by nazarenooviedo (@nazarenooviedo) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted September 8, 2022 Here's how I'd do it using a quickTo(): See the Pen NWMxRvM?editors=0010 by GreenSock (@GreenSock) on CodePen Does that help? 1 1 Link to comment Share on other sites More sharing options...
Author Share Posted September 8, 2022 thanks so much Jack! it's just I needed 🙏 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now