So change this...
to this...
and it should work, right? :-/
mesh=TReceiver.mesh numsurfs=bbCountSurfaces(mesh) For s=1 To numsurfs surf=bbGetSurface(mesh,s) numverts=bbCountVertices(surf)-1 For vert=0 To numverts Select TTexProjector.mode Case PROJECT_CONE bbTFormPoint bbVertexX(surf,vert),bbVertexY(surf,vert),bbVertexZ(surf,vert),mesh,TTexProjector.entity x#=bbTFormedX() y#=bbTFormedY() z#=bbTFormedZ() dist#=Sqr(x*x+y*y+z*z)*TTexProjector.scale texu#=x/dist+.5 texv#=1#-(y/dist+.5) Case PROJECT_LINE 'currently not available End Select bbVertexTexCoords surf,vert,texu,texv Next Next
to this...
mesh=TReceiver.mesh numsurfs=bbCountSurfaces(mesh) For s=1 To numsurfs surf=bbGetSurface(mesh,s) numverts=bbCountVertices(surf)-1 For vert=0 To numverts bbTFormPoint bbVertexX(surf,vert),bbVertexY(surf,vert),.. bbVertexZ(surf,vert),mesh,TTexProjector.entity x#=bbTFormedX() y#=bbTFormedY() z#=bbTFormedZ() Select TTexProjector.mode Case PROJECT_CONE dist#=Sqr(x*x+y*y+z*z)*TTexProjector.scale texu#=x/dist+.5 texv#=1#-(y/dist+.5) Case PROJECT_LINE texu#=x+.5 texv#=1#-(y+.5) End Select bbVertexTexCoords surf,vert,texu,texv Next Next
and it should work, right? :-/