Getting a normal value from a point on a terrain surface?

Blitz3D Forums/Blitz3D Programming/Getting a normal value from a point on a terrain surface?

Craig H. Nisbet(Posted 2003) [#1]
Anyone know how to get the normal from the a location on the surface of a blitz terrain object?


poopla(Posted 2003) [#2]
Afaik since it isn't a mesh, and because the blitz terrains arent solid state, you can't.

The only kludge thing I can think of is finding it by using the heights you have defined for each grid point.


GitTech(Posted 2003) [#3]
can't you do a LinePick from some distance above the terrain, and then use PickedNX(),PickedNY(),PickedNZ()?

LinePick x,y+20,z0,0,-30,0
nx#=PickedNX()
ny#=PickedNY()
nz#=PickedNZ()


Not tested btw :)

edit: Make sure that the pickmode of the terrain is polygon pickmode!