Hello,
Is ScrollToPlugin supposed to work in a timeline?
I tried but when it gets to the scrollTo function, it just scrolls a bit (approx 60vh below), so not as indicated (target is to the next section, which is 100vh below) even if I change the target of the scrollTo (e.g. a section which is further below) it moves/scroll just a bit to the same location. As soon as I exclude the scrollTo from the timeline it scrolls where it supposed to (to #section-4-10).
let tg = gsap.timeline({scrollTrigger: {
trigger:"#div_block-2-10",
toggleActions: "play pause resume reset",
tg.from("#div_block-2-10", {duration: 3, ease: "back", x:-1500, rotate:-360});
tg.to("#div_block-2-10", {repeat:1, ease:'linear', duration:2, rotateY:360,});
tg.to("#div_block-2-10", {duration: 1.5, ease: "linear", x:1500, rotate:360});
tg.to(window, {duration: 2, scrollTo: {y:"#section-4-10", autoKill:true}, ease:"power4"});
I also tried with Snap (snapTo: 1) but same behavior, it just just scroll a bit (at the exact same location whereas the scrollTo is actually stopping) instead of the intented behavior.
Thanks
Thibaut