Jump to content
Search Community

Draggable controlling timeline

sirhclluk test
Moderator Tag

Go to solution Solved by sirhclluk,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Is this possible with Draggable?

In a banner I want to drag a road jpg horizontally, and have a car move along the road as I drag the road jpg.

So the car stays in the same spot horizontally, just moving up and down and turning as needed.

 

if it is possible could someone share a link related to it?

 

Thanks

Link to comment
Share on other sites

Hi sirhclluk :)

 

You just need an onDrag callback to control the progress of the timeline. I didn't have time to make a CodePen for you, but please check out this thread:

 

http://greensock.com/forums/topic/11161-control-timeline-through-rotation-draggable/

 

Rodrigo has a nice CodePen in his answer. That should get you started.

 

Happy tweening.

:)

  • Like 2
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...