DarkBASIC Professional Help Wiki
Advertisement


This command will monitor the arrow keys and move the camera based on their activity.

Syntax
CONTROL CAMERA USING ARROWKEYS Camera Number, MoveSpeed, TurnSpeed
Parameters
Camera Number

Integer
The camera number MoveSpeed Float
The move value TurnSpeed Float
The turn value

Returns

This command does not return a value.

Description

The up and down arrow keys move the camera forward and backward. The left and right arrow keys turn the camera left and right respectively.

Example Code
autocam on:backdrop on

make matrix 1,4000,4000,100,100

set matrix height 1,50,50,500

update matrix 1

position camera 0,0,500,500

point camera 0,2000,0,2000

make camera 1

position camera 1,0,500,500

point camera 1,2000,0,2000

set camera view 1,10,10,100,100

while mouseclick()<>1

if inkey$()="z" then set current camera 0 : c=0

if inkey$()="x" then set current camera 1 : c=1

control camera using arrowkeys c,1,1

endwhile

while mouseclick()=1 : endwhile

delete matrix 1:autocam off:backdrop off

end
Advertisement