creating a shadow for a vehicle riding on a terrain

i have created a game which makes use of a terrain that is created via the "parseSVG" method (http://www.ezqueststudios.com/blog/box2 ... er-curves/).. there is a vehicle that is able to drive-over and jump on this terrain... the vehicle is basically just a body that i apply forces to to make it move forward, backward, jump, etc...

now, i need to be able to create a SHADOW for the vehicle..
question is, how do i do this??

is there a way to tell box2d to make the vehicle body check if there is anything directly below it (the terrain / ground), and to compute how far it is from the vehicle body itself..

this way, i can find out the distance of the vehicle body from the terrain and base the creation of the shadow from there...
(ex. the shadow gets smaller as the vehicle jumps and moves farther away from the terrain)

usually, i could do raycasting to find out if there is anything below the vehicle and how far it is from the object below...
but in the box2d world, things are slightly different..
raycast would be what i recommend if you are looking for it to work really well. raycast is part of box2d 2.1, or if you are using 2.01 there is a raycast addon out there, i think on borrisTheBrave's site.

Original thread: https://box2d.org/forum/viewtopic.php?t=5031