Jump to content
Search Community

Enless relative animation for the object

Vadym S. test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

Hi, can you please adwise how I can make relative animation so object enlessly moves in specific direction on some step relatively to it current position.

Start: box (x=0 y=0)

iteration 1: 1s animation box (x=100 y=0) 

iteration 2: 1s animation box (x=200, y =0)

iteration 3: 1s animation box (x=200, y =0)

and so on and so on.. 

 

I don't have end point, I don't have a total time ofr animation, but I know that obkect has to move 100px during 1s.

 

 

Link to comment
Share on other sites

  • Solution

Your timeline gets to be infinite or your tween does, but they can't be both infinite. 

 

I've set repeatRefresh: true, and  repeatDelay: 1, to the timeline, it will now recalculate the distance on each repeat and pauses for 1 second between those. 

 

Hope it helps and happy tweening! 

 

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

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