News:

Function Finder  Find all the functions within source code files

Main Menu

Problem with Displaying worlds

Started by monkeybot, August 10, 2011, 03:50:38 PM

Previous topic - Next topic

monkeybot

i am writing circles to world C and Boxes to World B,then assigning a camera to each world but only displaying one cam,but i still see boxes and circles   eh??

PlayBASIC Code: [Select]
global wldB=GetFreeWorld() 
CreateWorld wldB
global wldC=GetFreeWorld()
CreateWorld wldC
global camB=newcamera()
global camC=newcamera()
drawit3()
partitionworld wldC,32
partitionworld wldB,32

repeat
capturetoscene
clsscene
CameraGrabWorld camB,wldB
CameraGrabWorld camC,wldC
drawcamera camB
; drawcamera camC
sync
until false
end





Function drawit3()
local y
for y=0 to 5
local q=rnd(100)
if q<50 then plotBox()
if q>50 then plotCircle()
next
endfunction


function plotBox()
capturetoWorld wldB
local xb=rnd(500)
local yb=rnd(500)
box xb,yb,xb+20,yb+20,0;,col
endfunction

function plotCircle()
CaptureToWorld wldC
local xb=rnd(500)
local yb=rnd(500)
Circle xb,yb,20,0
endfunction







kevin


you're copying  what both cameras see into the scene, so you'll see both.