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.

DarkBASIC Professional Discussion / restrictions on looking up

Author
Message
Mikeygd3
12
Years of Service
User Offline
Joined: 18th Dec 2013
Location:
Posted: 14th Mar 2014 16:32
i have a game that the player can look using the mouse. the only problem is that if the mouse keeps moving up, so does the camera so it creates an infinite loop of looking up
ShellfishGames
13
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 14th Mar 2014 16:42
The question, among others, was answered here. Basically you just make sure the camera's x angle always stays between 90 and -90 degrees (or 85 and 85 or something like that).

tiffer
20
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 15th Mar 2014 22:31
i see what's going wrong here. Are you by any chance using the mousex and mousey commands? You need to use mousemovex and mousemovey.

Cwatson
tiffer
20
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 15th Mar 2014 22:34
This is how I handle mouse looking



Cwatson

Login to post a reply

Server time is: 2026-07-06 04:29:39
Your offset time is: 2026-07-06 04:29:39