Jump to content
Search Community

birdy247

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by birdy247

  1. Hi

     

    Another great response.

     

    I have updated the code pen and its closer to what I want 

    See the Pen RajMdx by birdy247 (@birdy247) on CodePen

     

    I am not worried about this mimicking a car race.  I just want each marker to be independently controlled. If one is behind and then goes "over the top" of the other, that is fine.

     

    My main worry was I could not adjust the speed of each marker in "real time".

     

    From the code pen, it looks like this is possible? (Unless I am mistaken!).

     

    I have built a timeline which takes the user through a series of transitions (they look like new pages to the user) before this "screen" is presented.  So, should I simply omit this from the timeline and then when its time to play this sequence, just use some callback to trigger play()?

     

    ^^ Hope that makes sense

  2. This sounds really familiar... 

    http://greensock.com/forums/topic/13327-animations-along-a-svg-path/?hl=gravity#entry58510

     

    This is what you want, but it's not easy.

    See the Pen XXbLer?editors=0010 by osublake (@osublake) on CodePen

     

    But it's not too hard to get a similar effect. Place boxes over you track in areas where you want something to happen. You can even use colors or other element attributes to help identity what should happen, i.e. green to speed up and red to slow down. Once you got got that setup, just do a hit test to see if your racer is inside a box and make any necessary adjustments. I just made one corner where the racer will slow down to show you how to do it. Once your good with your shapes, make them transparent and you're good to go.

     

    See the Pen ?editors=0010 by osublake (@osublake) on CodePen

     

    Hi, many thanks for the assistance.

     

    Just to be clear, it will not be pre-defined where the user speeds up or slows down.  I actually have a web-socket which is listening for speed data.  I am then doing some calc to work out how much the marker should speed up (or slow down).

     

    There are also 2 markers on the track which need to be controlled independently.

     

    Thanks

    Aaron

  3. Hi

     

    I am using the Bezier plugin to move a marker along a path.  This is working well.

     

    What I want to do, is slow down/speed up the marker along the path.

     

    I thought about using timeScale() but I find this "jumps" the marker to a new position.  Instead, I want it to be a gradual "natural" motion.

     

    The use case is a car going along a circuit

     

    Thanks

     

     

×
×
  • Create New...