Paint Terrain

Blitz3D Forums/Blitz3D Programming/Paint Terrain

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

;Create Terrain
oTerrain=CreateTerrain (128)
EntityPickMode oTerrain,2
textura=LoadTexture ("emerson\mossy.bmp")
EntityTexture oterrain,textura

Global brush=LoadBrush ("emerson\cur.bmp",1)


et=CameraPick (ocamera,MouseX(),MouseY())
PositionEntity esfera,PickedX(),PickedY(),PickedZ()
If et=oTerrain
ShowEntity esfera
If MouseHit(1)
CameraPick (ocamera,MouseX(),MouseY())
surf=PickedSurface ()
PaintSurface surf,brush
EndIf
EndIf