Making a Vehicle Hug a Track

I have been messing around with Unreal’s premade Advanced Vehicle for a while now and can’t figure out how to add this sort of functionality to it.

I would like for the vehicle to hug a track when it encounters a steep drop instead of flying off the track as shown in this picture

How would I go about doing something like this?