close but not quite right...don't have b3d in front of me right now but it should go something like this:
graphics3d 800,600,0,2
camera=createcamera()
cube=createcube()
entitypickmode cube,2 ;sets per polygon picking
moveentity camera,0,0,-10 ;move the camera back so it can see the cube
repeat
mx=mousex()
my=mousey()
updateworld
renderworld
if camerapick(camera,mx,my)<>0 then
color 255,255,255
text 0,0,"You put the mouse cursor over the cube"
else
color 255,255,255
text 0,0,"Mouse cursor not over anything"
endif
flip
until keydown(1)
end
something like that should work
|