Hey there,
I've got a ScrollTrigger to animate some "floating" objects (parallax) with randomly generated positions, and if I click on one of the objects, it fades out, then receives a new random position and then fades in again.
However, I am struggling to integrate all this together with the ScrollTrigger effects - As you can see in my demo, the objects jump around when spawning/scrolling, because the position is not calculated correctly anymore.
I thought I might need to update or create a new ScrollTrigger each time I hand out a new position - how would I do something like that?
Or is there a better, more elegant solution?
Thanks a lot!