You should regroup all ramp tiles into a pattern.
In script we could detect if a 2d bike intersect with a ramp shape or not, from that intersection we could estimate its 3d y and z. It's still a trial and error process though.
Other things will complicate the situation for example:
- two bikes one on ground, one in the air have the same x and a shadow, how to matching?
- the bike goes through and intersect with two consecutive small ramps, how to interpret?
In principle it's doable but it's still very big challenge scripting wise at least for me.
Just pass me your wip 3dn, i will see what can i do with it.