How would you recommend organizing this using Godot 4.6?

Godot Version

4.6

Question

I’m developing a 2D side-scrolling auto-runner game in Godot 4.6. I want to introduce uphill, downhill, and flat track sections.

My idea is:

* Uphill: the player’s cart gradually slows down.
* Downhill: the cart gradually increases its speed.
* Flat: the cart maintains its regular speed.

I’m trying to understand the correct architecture before I start creating the track artwork, platforms, collision shapes, and scenes.

Should I handle the slope detection and speed changes inside the player script, inside the individual track scenes, or use a combination of both?

You should be able to handle everything from within the player script.

thanks