- Home /
Moving objects problem
I want to move objects through a path and, when the path is finish, to start from the begging. All objects must have the same distance between them. Something like this:
The things is that, when the object reaches a certain point in the window (the end of the path) I change the position to the starting position. That causes that overlaps the last object in the path:
What can I do to solve this? I though of waiting X time for the object to change the y coordinate, but it will take different times on different computers.
Posting your code would be helpful in getting you an accurate answer.
Answer by Jiro-Ng · May 08, 2014 at 07:17 AM
Instead of changing the last object position to the starting position, you can set the position = first object position - distance. In this case,
red position = green position - distance.
You can use a variable to keep track the first object. When an object pass though the baseline, set the object position and set it as first object.
Yes that worked! I tried before but I had to adjust the distance to get a good result! Thanks! :)
Your answer
Follow this Question
Related Questions
Objects not always Spawning At Correct Location 2 Answers
Objects move on play 3 Answers
how to stop the camera to follow the player on his jump movement ? 2 Answers
Smooth Camera/Object Movement 1 Answer