I’m making a game where the player moves through an endless scrolling 2D world. Currently, I want the terrain to represent a sine wave, as shown in the provided illustration.
How should I setup my terrain scene to generate this terrain with collision? Or should the terrain generation be in the main game scene? If the later, what node structure should I use for my terrain?


I’d probably try to do this programatically. A collisionshape/-volume that’s calculated on-CPU and a small shader reimplementing the same shape / sine wave just visually on the GPU.
This should work if:
You can also adopt the wandering clipmap solution, if the terrain will not be convex.