Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Mouse Look Problem

Author
Message
gasolin
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location:
Posted: 29th Dec 2002 16:08
Hi I have a problem with the first person mouse look, I can't look up or down. This is a tutorials from darkbasic/create. I maybe have written the wrong code somewere or maybe it not possible to look up and down(yet, with that code). This is how the code look like.

Sync On
Sync Rate 30
Hide Mouse
Backdrop on
Set camera range 1,5000

Fog on
Fog distance 4000
Fog color RGB(128,128,128)
Color Backdrop RGB(128,128,128)

REM Make matrix
Make matrix 1,10000,10000,20,20

REM texture matrix
Load image "grass09.bmp",1
Prepare matrix texture 1,1,1,1
Fill matrix 1,0,1

REM Randomize the matrix
randomize matrix 1,125
X#=5000
Z#=5000

REM Main loop
Do
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = WrapValue(CameraAngleY#+MousemoveX()*0.2)
CameraAngleX# = WrapValue(CameraAngleX#+MousemoveY()*0.2)

REM Control input for camera
If Upkey()=1
XTest# = newxvalue(X#,CameraAngleY#,10)
ZTest# = newzvalue(Z#,CameraAngleY#,10)
If XTest#>0 and XTest#0 and ZTest#0 and XTest#0 and ZTest#
gasolin
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location:
Posted: 29th Dec 2002 16:10
hmm, here is the contiune of the code.


gasolin
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location:
Posted: 29th Dec 2002 16:18
Problem sovled =)

Login to post a reply

Server time is: 2024-05-01 21:46:29
Your offset time is: 2024-05-01 21:46:29