Align shadow to a terrain?

Blitz3D Forums/Blitz3D Programming/Align shadow to a terrain?

Giano(Posted 2006) [#1]
I'd like to use shadows with terrain like quads aligned to the terrain.

Which is the best way to align a (quad) entity to terrain?

thanks


Jams(Posted 2006) [#2]
What you want to do is a LinePick() straight down from your entity.

Then you can get the pick normals and align your shadow using the AlignToVector() command.

It would look something like this:
LinePick( x, y, z, 0, -1, 0 )
AlignToVector( meshHND, PickedNX(), PickedNY(), PickedNZ(), 2 )



Giano(Posted 2006) [#3]
Wow thanks, simple and usefull!