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 Doesn't Move When I Use dbAutoCamOff

Author
Message
TroyChappy
15
Years of Service
User Offline
Joined: 16th Jul 2009
Location:
Posted: 16th Jul 2009 09:08
Hey guys, i am learning Dark GDK and C++, and i thought i would just play around with making a FPS game just to see how to do it and to see if i could. When i use dbAutoCamOff() the camera seems to lock and doesnt move, and as soon as i take auto cam off out it works fine again, except it does not start where i specify using dbPositionCamera(). Here is my code.

It is probably something simple that i cannot see because i am new to coding with dark gdk and C++. Can anybody tell me why the camera stops being able to move when i use dbAutoCamOff()?

Thanks

Chappy
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 16th Jul 2009 20:52
I tested your code and the problem is not the dbAutoCamOff. The problem is the dbAutomaticCameraCollision. If you comment that out, the camera can move (regardless if dbAutoCamOff is present or not).

I think the issue is that you are inside a skybox, and wherever you want to move, the program always believes that the camera is colliding with the skybox and prevents you from moving. If you change the last parameter of dbAutomaticCameraCollision from 1 to 0, then you can move again because it will not try to limit the camera movement to "collision-free" areas.
TroyChappy
15
Years of Service
User Offline
Joined: 16th Jul 2009
Location:
Posted: 17th Jul 2009 00:28 Edited at: 17th Jul 2009 05:04
Okay, i tried that and it does allow the camera to move again, but when i press a key to move the camera it suddenly moves to outside of the sky box for some reason. I took out the collision code and the camera moves like it should. I think the collision is happening with the skybox as soon as i move and it is placing me out of the skybox because it is collision free there. Im new to Dark GDK so that may not be right but that is what i think could be happening. Does anybody know if that is right and how to fix it?

Chappy
TroyChappy
15
Years of Service
User Offline
Joined: 16th Jul 2009
Location:
Posted: 17th Jul 2009 08:43
I think it is the collision command that is doing it because i deleted the skybox and when i try to move it takes me to the outside of the map and then it has made a cube around the map which i cannot enter.

Chappy

Login to post a reply

Server time is: 2024-10-01 08:20:15
Your offset time is: 2024-10-01 08:20:15