Creating a road with horizon.

I am making a game in Android. Its a infinite runner. I wanted some help on the plane looking curved while loading new scenes. Like on turns in Subway Surfers…
I am scripting in C#. Thanks guys!

he wasn’t asking for for that guys he wanted the road to bend in X and Y axis ,

the easier way to do that without need to modeling bended models is curve shader , i’m using it now, it’s easy all you need to do is to control the X and Y offset value with yur code give it random number from -x to x when x = 0 then the road is straight, but i have only found a basic code that doesn’t support lights and shadows
if you find out how to add shdow and light to the shader please tell me ,

Shader "Custom/Curved" {
        Properties {
            _MainTex ("Base (RGB)", 2D) = "white" {}
            _QOffset ("Offset", Vector) = (0,0,0,0)
            _Dist ("Distance", Float) = 100.0
        SubShader {
            Tags { "RenderType"="Opaque" }
                #pragma vertex vert
                #pragma fragment frag
                #include "UnityCG.cginc"

                sampler2D _MainTex;
                float4 _QOffset;
                float _Dist;
                struct v2f {
                    float4 pos : SV_POSITION;
                    float4 uv : TEXCOORD0;
                v2f vert (appdata_base v)
                    v2f o;
                    float4 vPos = mul (UNITY_MATRIX_MV, v.vertex);
                    float zOff = vPos.z/_Dist;
                    vPos += _QOffset*zOff*zOff;
                    o.pos = mul (UNITY_MATRIX_P, vPos);
                    o.uv = mul( UNITY_MATRIX_TEXTURE0, v.texcoord );
                    return o;
                half4 frag (v2f i) : COLOR
                    half4 col = tex2D(_MainTex, i.uv.xy);
                    return col;
        FallBack "Diffuse"

Your ground should be created in “pieces”, or tiles, as prefabs. Each one is a plane of the same size. The only difference will be the texture on top. You will have straight textures, and bent textures on some. When you need the road to bend, you instantiate the tile which has a bent texture on int.

This is what I am referring to:

alt text