LM3ALLEM Posted August 25, 2022 Share Posted August 25, 2022 Hello, everyone! My problem is when I scroll camera works good but closer to the end its stopping moving smoothly. At the video I will show how its should work I was inspired by this web-site :)) And as I said, I have some little problems.. This how is working right now: Sorry for music :)))) See the Pen MWVPwJB by lucas23456 (@lucas23456) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted August 25, 2022 Share Posted August 25, 2022 Why are you using scrollTop to trigger scrollTriggered animations? scrollTop >= 3700 Link to comment Share on other sites More sharing options...
Cassie Posted August 25, 2022 Share Posted August 25, 2022 Have you watched this video?https://greensock.com/docs/v3/Plugins/ScrollTrigger I'd really suggest taking a step back and trying to understand how scrollTrigger works. You should be able to achieve this with one timeline which contains multiple tweens on the camera position. Link to comment Share on other sites More sharing options...
Solution Cassie Posted August 26, 2022 Solution Share Posted August 26, 2022 Sorry for the speedy responses yesterday! I was in a bit of a rush. So, a timeline - you could add a scrollTrigger to the whole page and then tween the camera position like this? (this is pseudo code, not for copy pasting) let timeline = gsap.timeline({ scrollTrigger: { start: 0, end: "max", scrub: true } }) tl.to(camera.position, { x: 20, }) .to(camera.position, { x: 0, }) .to(camera.position, { x: 40, }) You've posted this twice now though and it's still really hard to work out what you're after and what the issue is? It seems perfectly smooth to me, apart from a jump near the end which I assume is just due to a trigger position or tweening to the wrong value? But there's not really an obvious GSAP specific error. 1 Link to comment Share on other sites More sharing options...
LM3ALLEM Posted August 26, 2022 Author Share Posted August 26, 2022 5 hours ago, Cassie said: Sorry for the speedy responses yesterday! I was in a bit of a rush. So, a timeline - you could add a scrollTrigger to the whole page and then tween the camera position like this? (this is pseudo code, not for copy pasting) let timeline = gsap.timeline({ scrollTrigger: { start: 0, end: "max", scrub: true } }) tl.to(camera.position, { x: 20, }) .to(camera.position, { x: 0, }) .to(camera.position, { x: 40, }) You've posted this twice now though and it's still really hard to work out what you're after and what the issue is? It seems perfectly smooth to me, apart from a jump near the end which I assume is just due to a trigger position or tweening to the wrong value? But there's not really an obvious GSAP specific error. Thanks! 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