AlignToVector question

Blitz3D Forums/Blitz3D Programming/AlignToVector question

What axis did you create the shadow tris? Also, I'd move the quad along the normal rather than move it Y+, else as the slope of the ground gets steeper, the distance between the quad and the ground will get smaller, possibly increasing the chances of Z-fighting at a distance.

;Assuming quad normal is Y+
Const AXISX=1
Const AXISY=2
Const AXISZ=3

...
AlignToVector indshadow,PickedNX(),PickedNY(),PickedNZ(),AXISY,1
PositionMesh indshadow,treex#,treey#+0.1,treez#
MoveEntity indshadow,0,.1,0 ;raise the quad along ground normal rather than absolute Y+
..

Tom