Using more than one camera

Blitz3D Forums/Blitz3D Beginners Area/Using more than one camera

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.


Am I on the right lines with trying to use 2 cameras? If so, how do I tell Blitz which items to draw using which camera?



The only way (AFAIK) is either by manually hiding everything from the appropriate camera, rendering separately, then compositing the renders OR separating elements for each camera (spatially) so that they fall only within the intended camera's view and having them render over the top of one another:

Graphics3D 800,600,0,2
cam1=CreateCamera()
cam2=CreateCamera() : CameraClsMode cam2,False,True

PositionEntity cam2,0,0,1000


cube=CreateCube() : EntityColor cube,100,100,200
sphere=CreateSphere() : EntityColor sphere,200,100,100

PositionEntity cube,0,0,10

While Not KeyHit(1)
TurnEntity cube,1,2,3
sphereX=sphereX+1 : If sphereX>359 Then sphereX=sphereX-360
PositionEntity sphere,Cos(sphereX),0,1010


RenderWorld
Flip
Wend