How to make an AI of a car to jump if there is any obstacle

I am doing an game in which the player car can jump using the controls from keyboard.
But i want the oppenent car must also jump when there is an obstacle.i have try all the ways like using waypoints .but i did not find the solution how to do it??
please help me…
thanks in advance

You set a JUMP function ,and set a Collier on the road where you want that car jump,

and you can use OnTriggerEnter() function to execute the JUMP function

Suyuanhan’s solution could work, although if your level is quite large with lots of obstacles, it is an unpractical solution due to all the colliders and checks you would need to create.

A better solution is to do a Physics.Raycast from the AI car to determine if an obstacle is in the way. (You can do this by tagging all your obstacles and checking if they match that tag). Then you can use the script above for the jump or simply use Rigidbody.AddForce if your AI car has a rigidbody attached.