IF KB
(0).Q
THEN Cam.Rot.X
= Cam.Rot.X
+ 1 IF Cam.Rot.X
> 360 THEN Cam.Rot.X
= Cam.Rot.X
- 360
IF KB
(0).Z
THEN Cam.Rot.X
= Cam.Rot.X
+ 1 IF Cam.Rot.X
< -360 THEN Cam.Rot.X
= Cam.Rot.X
+ 360
yrotrad = (Cam.Rot.Y / 180 * 3.141592654F)
xrotrad = (Cam.Rot.X / 180 * 3.141592654F)
yrotrad = (Cam.Rot.Y / 180 * 3.141592654F)
xrotrad = (Cam.Rot.X / 180 * 3.141592654F)
yrotrad = (Cam.Rot.Y / 180 * 3.141592654F)
yrotrad = (Cam.Rot.Y / 180 * 3.141592654F)
diffx = Mouse(0).X - Mouse(1).X '// check the difference between the current x and the last x position
diffy = Mouse(0).Y - Mouse(1).Y '// check the difference between the current y and the last y position
Cam.Rot.X = Cam.Rot.X + diffy '// set the Cam.Rot.x to Cam.Rot.x with the addition of the difference in the y position
Cam.Rot.Y = Cam.Rot.Y + diffx '// set the Cam.Rot.x to Cam.Rot.y with the addition of the difference in the x position
'// Thinkthe thing the camera is following gets rendered here....
_glRotatef Cam.Rot.Y
, 0.0, 1.0, 0.0 ' //rotate our camera on the y-axis (up and down) _glTranslated Cam.
Pos.X
, 0.0F, Cam.
Pos.Z
' //translate the screen to the position of our camera