Calculation of positions large number of elements leads to Out of Memory

I am making conveyor belt. The length and speed of the conveyor belt may vary depending on certain conditions. The problem is if you set a very low speed for a large number of elements, as a result, huge arrays are created, which often leads to a out of memory.
For example, I have this problem with a speed 0.001 and 120 planes
Any ideas how to solve this problem easier?

Instead of computing the points beforehand, you can create a Path3D and use getPointAt to get the next position for the planes:

1 Like