I actually use a tweaked version of yours JFK EO-11110...
then use below to finish the quad
But Im having a major problem aligning this quad to the terrain. I tried my same exact code with a flattened sphere mesh and it worked great.
Function CreateQuad() ;Compliments of jfk EO-11110 mesh=CreateMesh() surf=CreateSurface(mesh) ;Texture Coords ;(0,0) ... (1,0) ; . . ; . . ; . . ;(0,1) ... (1,1) v0=AddVertex(surf, 0,40,0, 0,1) v1=AddVertex(surf, 31,40,0, 1,1) v2=AddVertex(surf, 0,40,31, 0,0) v3=AddVertex(surf, 31,40,31, 1,0) AddTriangle(surf,v0,v2,v1) AddTriangle(surf,v1,v2,v3) UpdateNormals mesh Return mesh End Function
then use below to finish the quad
Shdw = CreateQuad() ShdwTex = LoadTexture("Shadow.png",2) ;Used flag 2 for alpha EntityTexture Shdw,ShdwTex ScaleEntity Shdw,.5,1,.5 PositionEntity Shdw,EntityX(Sphere,True)-8,EntityY(Sphere,True)-44,EntityZ(Sphere,True)-8 EntityParent Shdw,Sphere ;make the shadow follow the movable object
But Im having a major problem aligning this quad to the terrain. I tried my same exact code with a flattened sphere mesh and it worked great.