I am currently working on an infinitely scrolling ground. It consists of several cubes that I add to the stage with a loop and a Z offset. I then am moving them in update by incrementing their Z position with a modifier and delta time.
I am now trying to achieve a curve effect with the same ground objects. I have tried several things so far until landing on a CatmullRomCurve3 - as I believe this would be best. So I was able to create a curve consisting of three points and then have one ground tile follow it using getTangent and getPoint for its rotation and position. I am now wondering if it is possible to have all of them following it as well or if there would be a better solution for this?
I only really need the Y position along the curve, and the rotation, assuming I continue to move them in space with my Z incrementing. Not sure if that would be ideal or not though.
Another thing I had tried earlier prior to curves was I had created a cylinder, rotated it on its side, then made sure each segment had two faces. I then did some math to get the center point of each segment and spawned my ground to those and just rotated the cylinder. This actually made the desired effect, but I ended up with 5x the amount of objects in my scene having a full cylinder as opposed to just a slight curve.
I am open to any suggestions and insights!