simple shadows

Blitz3D Forums/Blitz3D Beginners Area/simple shadows

The simplest method is to place a textured sprite or quad directly below the character.

* Texture the shadow mesh using a texture like this ...



* Set the shadow mesh entityblend to multiply.

* Make the terrain pickable and each frame do a linepick straight down. Linepick entityx( character ) , entityy( character ) + 10 , entityz( character ) , 0, -20, 0

* Move the shadow mesh slight away from the terrain to avoid z fighting. positionentity shadowmesh, pickedx()+.1*pickednx(), pickedy()+.1*pickedny(), pickedz()+.1 * pickednx()

* Align the shadow mesh to the landscape contour. aligntovector shadowmesh, pickednx(), pickedny(), pickednz(), 2

That should work plenty fast for quite a few characters.

Stevie