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?

  • Sanctus@anarchist.nexus
    link
    fedilink
    English
    arrow-up
    2
    ·
    9 days ago

    It might be interesting to make the node its own scene if only to use it as a “plug in” to change the generation. Then you could make different generators that you pop in and out during play. But tbh you could probably achieve that without a separate scene by exposing the generation params in the inspector.