So I have this code snippet, use the up arrow to zoom in, down arrow to zoom out. But when I zoom in on the spere, there comes a point where from the inside out it starts to disapear, how can I make the camera zoom right in on the spere, so it takes the whole screen without disapearing. Also Obviously for a space game, is using the camera as the space ship, and moving it around like this the way it's done?
Snippet:
Graphics3D 800,600,0,2
SetBuffer BackBuffer()
camera = CreateCamera()
CameraViewport camera,0,0,800,600
light = CreateLight()
cube = CreateSphere(16)
PositionEntity cube,0,0,5
While Not KeyHit(1)
If KeyDown(200) = True Then
MoveEntity camera,0,0,0.01
ElseIf KeyDown(208) = True Then
MoveEntity camera,0,0,-0.01
EndIf
UpdateWorld
RenderWorld
Flip
Wend
End
Snippet:
Graphics3D 800,600,0,2
SetBuffer BackBuffer()
camera = CreateCamera()
CameraViewport camera,0,0,800,600
light = CreateLight()
cube = CreateSphere(16)
PositionEntity cube,0,0,5
While Not KeyHit(1)
If KeyDown(200) = True Then
MoveEntity camera,0,0,0.01
ElseIf KeyDown(208) = True Then
MoveEntity camera,0,0,-0.01
EndIf
UpdateWorld
RenderWorld
Flip
Wend
End