Hi, does anyone know how I can detect the height of a face directly beneath a model? I have some terrain and a ship and I basically want the ship’s height to change depending on the height of the terrain beneath it so that it appears to hug the terrain as it moves (like in the wipeout or fzero games). Any help appreciated, thanks
Well if you can find some free code to do a line intersection on a plane (Used to be on gametutorials.com)… usually you can create a “plane” from a triangle (three points to define a plane) and then your line will be from your spaceship straight down below the terrain. then the y value where the line intersects the “plane” (triangle) is where you will want to put the bottom of your ship, or maybe a couple points higher to make it look like it is floating.
hi, an unoptimized method would be to read the height values and save them ina an array then as you move your ship compare them
Thanks a lot guys, I’ll give it a go