alpha on rectangles

Blitz3D Forums/Blitz3D Programming/alpha on rectangles

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.

You were positioning the sprite too far away from the camera. The positionentity command is at local coords remember. You're scaling the sprite v big unecessarily. You were also colouring the sprite black so you wouldn't see it anyway.

Try this ...

Graphics3D 640,480,16,1

;create the camera
Global camPointer = CreatePivot()
PositionEntity camPointer,640,72,1895
TurnEntity campointer,0,-135,0,True

;campointerY = TerrainHeight#(terrain,EntityX(Campointer),EntityZ(CamPointer)) * 128
;PositionEntity camPointer,500,campointerY,700

Global cam = CreateCamera(camPointer)
MoveEntity cam,0,80,-100
CameraFogMode cam,1
CameraFogColor cam,150,150,150
CameraFogRange cam,300,1024

;the sprite for the background of the buttons
buttonbg = CreateSprite(cam)
ScaleSprite buttonbg,1,.5
EntityColor buttonbg,100,100,100
PositionEntity buttonbg,0,0,1
 
While Not KeyDown(1)

RenderWorld()
Flip

Wend



Hope this helps.

Stevie