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 / camera decay for fps game

Author
Message
A beagle
16
Years of Service
User Offline
Joined: 5th Apr 2010
Location: in an atmosphere of extreme pessimism
Posted: 10th May 2010 17:54
Hello, I've been working on a little FPS demo and I just learned to use this code


however, this allows for the camera to move all the way around, and do flips on it's x pivot. Can anybody help?

eat the pixelated shotgun
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th May 2010 22:35
You have to apply a limit to the x rotation to keep the angles between 270 and 360 degrees, or 0 and 90 degrees.

That's a pain though, so you can cheat - add 90 degrees, and you only have to keep the angles between 0 and 180, and then subtract 90 degrees when you're done.



A beagle
16
Years of Service
User Offline
Joined: 5th Apr 2010
Location: in an atmosphere of extreme pessimism
Posted: 11th May 2010 00:22
I tried that code, and now the camera will not move at all on it's x.

eat the pixelated shotgun
A beagle
16
Years of Service
User Offline
Joined: 5th Apr 2010
Location: in an atmosphere of extreme pessimism
Posted: 16th May 2010 00:52
never mind. I eventually fixed it. thanks for the help IanM, it was apreciated

eat the pixelated shotgun

Login to post a reply

Server time is: 2026-07-26 04:28:02
Your offset time is: 2026-07-26 04:28:02