This works for a blitz terrain...
TFormPoint posx,0,posz,0,terrain
PositionTexture texture,-0.5+TFormedX()/uscale,(tsize/vscale-0.5)-TFormedZ()/vscale
posx and posz are the world x and z positions. tsize is the terrain grid size. Uscale and vscale are the texture scale. Don't ask me why you need to apply the tsize/vscale offset though because I have not worked it out yet!
I just noticed you say you are using a mesh terrain. Well the same prinicple should apply as for a blitz terrain, with some alteration for UV's and so on. Anyway just post a link to the terrain or a similar one if you are still having problems.
TFormPoint posx,0,posz,0,terrain
PositionTexture texture,-0.5+TFormedX()/uscale,(tsize/vscale-0.5)-TFormedZ()/vscale
posx and posz are the world x and z positions. tsize is the terrain grid size. Uscale and vscale are the texture scale. Don't ask me why you need to apply the tsize/vscale offset though because I have not worked it out yet!
I just noticed you say you are using a mesh terrain. Well the same prinicple should apply as for a blitz terrain, with some alteration for UV's and so on. Anyway just post a link to the terrain or a similar one if you are still having problems.