Jump to content
Search Community

Refresh Trigger in a scrollTrigger

Antoine Thenoz test
Moderator Tag

Recommended Posts

Hi,

 

I have a problem with a trigger in my scrollTrigger.

I want an animation to start when the trigger of an other element touch it but this element move faster than the scroll so the trigger is not on it.

It's not really clear but look at the codePen.

 

 

I want the trigger of the element separate to follow the element separate.

I think I need to put something on the callback but I don't really know what.

 

Thanks

See the Pen zYMMaex by Antoine-Thenoz (@Antoine-Thenoz) on CodePen

Link to comment
Share on other sites

Yeah, the problem is that you're animating the trigger element itself, so that will throw off the calculations. You should almost never animate the trigger element itself. 

 

With enough custom logic, you could accomplish it, though. It's beyond the scope of help we can provide for free in these forums, but it basically boils down to setting the start/end values such that they factor in the linear movement you're doing to the trigger itself. We do offer paid consulting services, so feel free to reach out to us if you'd like to explore that. 

 

Anyone else is welcome to chime in with suggestions here, of course. 

 

Good luck with the project. 

Link to comment
Share on other sites

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