Thanks "arkon", but I couldn't get it to work.
Anyway, by replacing the While/Wend loop in the terrain demo with the following code, it enables the cursor keys to steer the camera:
Anyway, by replacing the While/Wend loop in the terrain demo with the following code, it enables the cursor keys to steer the camera:
While gKeyHit(KEY_ESCAPE) = 0 And gProgress() = 1 If gKeyHit(KEY_F2) ;Polygon mode pMode = pMode + 1 If pMode > 2 Then pMode = 0 gSetPolygonMode Mat_1, pMode End If ;Move Camera newTime# = gGetNewTime() * 50 deltaTime# = gGetDeltaTime() ; gMove Camera_PV, -deltaTime# * 60 x# = gGetX(Camera_PV) y# = gGetY(Camera_PV) z# = gGetZ(Camera_PV) ty# = gGetTerrainHeight(Terrain, x#, y#, z#) y# = y# + ((ty# + 20) - y#) * deltaTime# * 10 If y# < ty# + 5 Then y# = ty# + 5 gSetPosition Camera_PV, x#, y#, z# ; gSetRotation Camera_PV, 0, Cos(newTime#/ 4.0) * 60, 0 If gKeyDown(KEY_UP) Then gMove Camera_PV, -1 If gKeyDown(KEY_DOWN) Then gMove Camera_PV, 1 If gKeyDown(KEY_LEFT) Then gTurn Camera_PV, -1 If gKeyDown(KEY_RIGHT) Then gTurn Camera_PV, 1 Wend