Yes. Here's a simple demo. Can someone suggest a simpler way of getting the text on screen and of getting pick object to work in both camera views?
set display mode desktop width(), desktop height(), 32
sync on : sync rate 60 : sync
autocam off
position camera 0, 0, -500
point camera 0, 0, 0
color backdrop rgb(0, 24, 0)
set camera view 64, 64, 566, 566
make camera 1
position camera 1, 500, 0, 0
point camera 1, 0, 0, 0
color backdrop 1, rgb(24, 0, 0)
set camera view 1, 600, 64, 1112, 566
for obj = 1 to 40
shape = rnd(99) > 49
select shape
case 0
make object sphere obj, 30
set object mask obj, 1 ` make these visible to camera 0 (i.e. first bit is set to 1)
position object obj, rnd(600)-300, rnd(600)-300, rnd(600)-300
endcase
case 1
make object cube obj, 25
` set object mask obj, 2 ` make these visible to camera 1 (i.e. second bit is set to 1)
position object obj, rnd(600)-300, rnd(600)-300, rnd(600)-300
endcase
endselect
next obj
set current camera 0
create bitmap 1, 200, 40
repeat
` need to decide which camera we should use - there might be a neater way of doing this
mx = mousex()
my = mousey()
if mx < 567
set current camera 0
else
set current camera 1
endif
` print the message on a small bitmap and grab the image - is there a simpler way?
message$ = "picking object "+str$(pick object(mx, my, 1, 40))
set current bitmap 1
cls rgb(0, 0, 64)
text 20, 20, message$
get image 1, 0, 0, 200, 40, 1
set current bitmap 0
paste image 1, screen width()/2-300, 600
sync
until spacekey()
end