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.

Dark GDK / Mouse look limit

Author
Message
SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 28th Sep 2008 04:58
Hello, I have searched the forum pretty good and cant find a good working demonstration of this.

I am trying to cap the mouse look so you don't flip the view all the way backwards when moving your mouse up. Here is my mouse look code now...



As you may have guessed, I'm doing a FPS.

Thank you.

www.Helios-Online.net
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 28th Sep 2008 12:00
that code there is to rotate object, not camera...
anyway, you can just make an if to cap it:

stuff like. play around with it
SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 28th Sep 2008 17:17
Awesome thanks, I was trying to do something like that but couldn't get it. Here is what I ended up using:



But now I am stumped on another question, no need to make another post. I am using a sphere as the player for collision as of now, but I can't get a good way to make the sphere transparent. I tried the following and it works, but when you ALT+TAB or open another window and come back to the game, it errors out saying the object is missing. I understand why but think of a better way to do it.

Current player creation code...


www.Helios-Online.net
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 3rd Oct 2008 03:48
Does setting the object's Alpha level to 0, so that it is still there and rendered, just invisible....

Im not sure if thats a known issue with GDK or not.. sounds kind of like one, something to do with not restoring the device properly(internally) I assume.

If it ain't broke.... DONT FIX IT !!!
SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 4th Oct 2008 17:48
Yeah I solved this a bit ago, the other one was kinda odd. I don't know if it is an issue or not. I just used this like you said...



www.Helios-Online.net

Login to post a reply

Server time is: 2024-11-25 03:36:16
Your offset time is: 2024-11-25 03:36:16