I’m so happy about how this script that generates a roller coaster track from a Curve3D turned out!

You can find the code on GitHub.

Be sure to download track.gd, track_generation.tscn and meshes/track_sleeper_rollercoaster.res and fix the path to the mesh on the code.

The roller coaster will be part of my game horror Delta Park , adding to the creepy atmosphere.

  • ulterno@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    12 days ago

    Nice. Now just if you could make it more physics’y. As in, make it go faster when it falls downwards and make it look like it is putting in extra effort, in cases it is going upwards, higher than what momentum would take it.

    If you feel like doing this, I’d suggest using parameters for:

    • gravity
    • momentum
    • friction, so just reduce momentum based on traveled distance
    • minimum speed, to make sure it keeps going and that will look like it is using its motors to keep running
    • Tibi@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      ·
      11 days ago

      Also my immediate thought is that the End of the track when it connects to the Start isnt doing it with derivatives and therefore looks not smooth/shockfree.