What I would do is:
Before game starts, spend around 1 second, to (automatically) survey the terrain and store 'angle' data in an array. That way, all the CPU-consuming tasks (collision-checking for angle detection) will be done beforehand and not in real-time.
For example: Use the Ray-casting method by — (above), and have it run along the terrain rapidly (use object time-scale if possible), and as it moves, every X distance, it checks the angle and stores in an array.
Then, when the player uses the terrain, based on the X location, it uses the array data to set angle.
Just a thought. What do you think?