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 y rotation

Author
Message
captain caveman
8
Years of Service
User Offline
Joined: 9th Dec 2013
Location:
Posted: 9th Dec 2013 17:31
I can't move along the y axis when I run this code, any body have any suggestions?

LBFN
15
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 10th Dec 2013 15:59
Hi captain caveman,

The title of your request is regarding camera Y rotation, yet you ask about moving along the Y axis here. I ran the program and the Y rotation works fine. I could rotate using the arrow keys or with the mouse with no problem. Moving along the Y axis could eaily be done in your _camera subroutine, like this:


I'm not sure if that is really what you are after. I see you are limiting the X rotation of the camera using the mouse. I wonder if maybe you want to know how to move the camera forward while still being able to look up / down. ??

So many games to code.....so little time.
captain caveman
8
Years of Service
User Offline
Joined: 9th Dec 2013
Location:
Posted: 10th Dec 2013 19:29
There was a problem with controlling the mouse with the arrow keys and y rotating the camera with the mouse when I ran the code...
captain caveman
8
Years of Service
User Offline
Joined: 9th Dec 2013
Location:
Posted: 10th Dec 2013 20:52
I can move the camera using the wsad keys while rotating the camera with the mouse:

LBFN
15
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 10th Dec 2013 21:49
Typically, rotation using the mouse is not combined with a key to rotate the camera also. Usually, when using the
WASD keys the A and D keys are used for strafing, instead of turning. Your latest _camera subroutine revised to show this:


Check it out to see if this works better for you.

So many games to code.....so little time.
captain caveman
8
Years of Service
User Offline
Joined: 9th Dec 2013
Location:
Posted: 11th Dec 2013 00:53
Yer that does work better thanks LBFN

Login to post a reply

Server time is: 2022-06-27 06:19:20
Your offset time is: 2022-06-27 06:19:20