A carriage following a track cars

Hello everyone!
I try to make a conveyor belt, but I have a problem.
How i can do many elements move a circle continuously?
Is there better option than creating additional points?

Demo: https://www.babylonjs-playground.com/#HSMDF2#412

You absolutely need a point for every change in direction. The more straight sections you have the better. You could Lerp in between the straight points.

The problem is now going to be the amount to lerp each frame. It must be proportioned to the length of the segment. If you do not, your spacing is going to change. This “cure” would definitely make your beforeRender code more complicated. Vector3's are pretty cheap.

1 Like