How to control the camera?

Blitz3D Forums/Blitz3D Beginners Area/How to control the 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.

;PRESS SPACE TO SEE CAMERA TRACK MOVING TARGET
Graphics3D 640,480,0,2
SetBuffer BackBuffer()

cam=CreateCamera()
PositionEntity cam,10,2,3

target=CreatePivot()
PositionEntity target,20,3,20

model=CreateCube(target)
EntityFX model,1
reference=CreateCube()
ScaleEntity reference,5,.1,5
PositionEntity reference,20,1,20 

base=90

While Not KeyDown(1)

If KeyDown(57)
base=base+1 : If base>360 Then base=base-360
PositionEntity target,20+(Cos(base)*1.5),3,20
EndIf


PointEntity cam,target
UpdateWorld
RenderWorld
Flip
 
Wend