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 and Object Acting Weird

Author
Message
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 5th Jan 2009 07:27
For some reason the camera wont set up like I want it to. I want the camera to be positioned 0,0,-500 and then create spheres that are located at 0,0,0 but for some reason:

1) The camera wont move back or wont show my objects

2) The object appears higher than it should be.

#include "DarkGDK.h"





See attached image for screenshots.

Attachments

Login to view attachments
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 5th Jan 2009 07:36
That screenshot looks fine to me.
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 5th Jan 2009 08:17 Edited at: 5th Jan 2009 10:05
Its too close.

Even after changing the camera distance its still too close.

Edit: See attached image and code in the background. The sphere should be centered but its not.

Edit: It seems that if the camera position code is above the sphere creation code then the camera doesn't move. If the code is below, them the camera is not centered.

Edit: Seems like the camera needs to be pointed at 0,0,0 to center the sphere and the code must be after the spehere creation code.

Attachments

Login to view attachments
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 5th Jan 2009 11:42
ReiKumar,

I think the problem is that you need to turn off Autocam.

dbAutoCam command? Not sure exatcly as I don't generally use the GDK.

By default, whenever you create a new object DGDK will position the camera automatically to center on the new object. dbAutoCam should prevent this behaviour and leave the camera wherever you place it.

SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 5th Jan 2009 21:38
The function you want to use is dbAutoCamOff(). Call it right at the start of your program.


My site, for various stuff that I make.

Login to post a reply

Server time is: 2024-09-30 15:22:55
Your offset time is: 2024-09-30 15:22:55