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 / Camera Movement Help?

Author
Message
CokeBoi
15
Years of Service
User Offline
Joined: 19th Jun 2009
Location:
Posted: 16th Aug 2009 23:35
Hi, I have a problem. My Camera moves forward or backword based on where it is facing. If you move the mouse your camera moves in the same direction (ex. Move Mouse Left = Move Camera Left). My Problem is
that when I move my Mouse Up or Down the camera either moves up into the sky or down into the ground. How Can I fix this?




LOL
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 17th Aug 2009 01:42
Do a check each loop for the camera's current height, if it is above or below whatever amount you require as the max, then dont move..

If it ain't broke.... DONT FIX IT !!!
CokeBoi
15
Years of Service
User Offline
Joined: 19th Jun 2009
Location:
Posted: 17th Aug 2009 02:41
Is that the only way? Because it might be a little chunky.

LOL
CokeBoi
15
Years of Service
User Offline
Joined: 19th Jun 2009
Location:
Posted: 17th Aug 2009 03:49 Edited at: 17th Aug 2009 21:23
I gave up on Strafing. Now I hit a problem. The A and D keys rotate me left and right. My mouse ALSO rotates (I don't know why I did that). The problem is that once I let go of pressing the A or D key I just zoom right back to where my mouse was facing. Heres my code:

Main


MouseMove.h


Movement.h


MouseMove.cpp


Movement.cpp



I know what the problem is, I just don't know how to fix it.

LOL
CokeBoi
15
Years of Service
User Offline
Joined: 19th Jun 2009
Location:
Posted: 17th Aug 2009 20:40
Bump

LOL
CokeBoi
15
Years of Service
User Offline
Joined: 19th Jun 2009
Location:
Posted: 18th Aug 2009 21:09
Doesn't anyone know how to make the camera look like its going left or right O_o?

Do I use the dbPositionCamera (); Function? What do I use? How would I go about doing this?

Please Help I've been stuck on this for 3 days so far...

LOL
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 18th Aug 2009 21:46
Do you want A-key and D-Key to make your object strafe?
And then use your mouse to look around?
Serial Velocity
16
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 18th Aug 2009 21:47
If you mean make the camera move left/right then its just:

dbMoveCameraLeft( CameraID, Speed );
dbMoveCameraRight( CameraID, Speed );

CokeBoi
15
Years of Service
User Offline
Joined: 19th Jun 2009
Location:
Posted: 18th Aug 2009 22:16
Now If I've Just Been using the default camera (no camera ID) Do I just set it to 0?

LOL
Serial Velocity
16
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 18th Aug 2009 22:16
Yeah

Login to post a reply

Server time is: 2024-11-20 17:24:01
Your offset time is: 2024-11-20 17:24:01