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 / help with camera rotation using arrow keys

Author
Message
dax24
20
Years of Service
User Offline
Joined: 2nd Feb 2004
Location:
Posted: 3rd Feb 2004 18:39
hi, i have sorted some code out to make a camera rotate around an object by pressing a key but it will do a full 360 then stop. what i want to do is hold down the arrowkey and the camera will rotate but when i release the key the camera will stop at what ever angle i am at. can anyone help me?
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 3rd Feb 2004 19:29
ummmm...
I think this will work...



I think thats what your asked... Well... I hope It Helps

Do not thwart the way of the dragon. For thou tasteth like chicken.
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 4th Feb 2004 01:42
Careful about using the Turn and Pitch commands, it always rotates by the camera's orientation, which means if it's tilted to its side, all turning and pitching will be tilted to the side. The turn and pitch methods work great for games like Descent and Star Wraith, but if you're trying to do a first person shooter try this:



good luck,
Crazy Donut Productions

Juvenile Industries
Current Project: KillZone(FPS)
Soon to come:An rts, and a snowball fight game
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 4th Feb 2004 07:39
If you want a proper spherical 3d camera based system try the attached code out. I've posted it to the bugs forum because there is a small DB Pro bug connected with it. However, this does not in anyway effect its functionality:

http://darkbasicpro.thegamecreators.com/?m=forum_view&t=24711&b=15

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P1.3ghz / 384 megs / GeForce MX 5200 128meg / WinXP home
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 4th Feb 2004 07:39
Er... when I say attached I mean follow the link and look at the code attached there. Sorry. I wasn't clear.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P1.3ghz / 384 megs / GeForce MX 5200 128meg / WinXP home
dax24
20
Years of Service
User Offline
Joined: 2nd Feb 2004
Location:
Posted: 4th Feb 2004 19:00
thanks Philip for that, it has propa helped me out and after following through the code rather then cut and paste i understood it fully incase i need it for future projects.

Login to post a reply

Server time is: 2024-09-21 18:33:08
Your offset time is: 2024-09-21 18:33:08