While searching the forum, try alternatives that might end up with what you are looking for.
This have been posted many times. Anyways here is how.
Rem ***** Main Source File *****
Autocam Off : Sync On
REM COORDINATES AND SIZES ARE 2D SCREEN COORDINATES
scrObj1 = Hud2D(50, 50, 0, 0, 0, "PLAIN")
scrObj2 = Hud2D(100, 50, 0, 540, 430, "PLAIN")
scrObj3 = Hud2D(100, 0, 0, 280, 190, "SPHERE")
Make Matrix 1, 1000, 1000, 10, 10
Position Camera 0, 10, 0
Do
ang# = wrapvalue(ang# + 0.1)
yRotate Object scrObj3, ang#
mmx = mousemovex() : mmy = mousemovey()
ax# = wrapvalue(ax# + mmy)
ay# = wrapvalue(ay# + mmx)
rotate camera ax#, ay#, 0.0
if mouseclick()=1 then move camera 1
if mouseclick()=2 then move camera -1
text 0, 50, "Screen Fps: "+str$(screen fps())
text 0, 64, "Static: "+str$(statistic(1))
Sync
Loop
`>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
`xSize = object 2d x Size
`ySize = object 2d y Size
`xPos = object 2d x Position
`yPos = object 2d y Position
Function Hud2D(xSize As Integer, ySize As Integer, zSize As Integer, xPos As Integer, yPos As Integer, obj As String)
scrW = Screen Width() : scrW2 = scrW / 2.0
scrH = Screen Height() : scrH2 = scrH / 2.0
hud = freeObject()
if obj = "BOX" Then Make Object Box hud, xSize, ySize, zSize
if obj = "CUBE" Then Make Object Cube hud, xSize : ySize = xSize
if obj = "SPHERE" Then Make Object Sphere hud, xSize : ySize = xSize
if obj = "PLAIN" Then Make Object Plain hud, xSize, ySize
Position Object hud, 0-(scrW2-xSize/2.0)+xPos, (scrH2-ySize/2.0)-yPos, ((scrW - scrH) * 2.5)
`Point Object Hud, camera Position x(), camera Position y(), camera Position z()
Lock Object On hud
Disable Object zWrite hud
EndFunction hud
Function freeObject()
Repeat
Inc i
Until Object Exist(i) = 0
EndFunction i
There is always one more imbecile than you counted on.