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 / And now it's camera handling

Author
Message
Vlad
19
Years of Service
User Offline
Joined: 5th Oct 2005
Location:
Posted: 19th Dec 2005 00:22
Hi again

What am I missing here? Camera simply does not do what I want. Let me brief you with the idea here:

I take the size of the basic piece that I use to build the board. Since I know the position of the center piece, I use the same calculations to position the camera and point it there.

The results are always a camera in 0,0,0, pointing at 0,0,0. What am I missing?



I've tried diferent approachs, event entering values directly like position 100,100,100 and point 200,200,200, and nothing happens. I must be missing something, I just don't know what.

Can someone throw a helping hand please?

V

I'm pretty sure I know everything. Doubts are something rare in me and I am never wrong, as this signature can prove.
Dark Lord
19
Years of Service
User Offline
Joined: 19th Aug 2005
Location: Australia
Posted: 19th Dec 2005 02:52
Can I please have your full code? I dont know if this will work but try taking out the dbSetCurrentCamera() command. Another idea would be to update the camera position in a loop, also try printing the camera positions and other data to the screen in the loop.
Vlad
19
Years of Service
User Offline
Joined: 5th Oct 2005
Location:
Posted: 19th Dec 2005 12:04 Edited at: 19th Dec 2005 12:07
Sure and sorry. There's a slight bug in the createTable part, nevermind it, I know how to get over it. My annoyance level is on the camera handling and the randomize (that apparently does not randomize).

I have tried to take out the dbSetCurrentCamera with no luck. But I never tried to put it on a loop and to be honest, it doesn't make any sense the way I see it, maybe I'm wrong.

There are some variables there that just exist to assure that loops are executed once and some debugging, that will be cleaned out later, so pay no attention to it as I'm still developing C++ also.



Thank you in advance

V

I'm pretty sure I know everything. Doubts are something rare in me and I am never wrong, as this signature can prove.
Vlad
19
Years of Service
User Offline
Joined: 5th Oct 2005
Location:
Posted: 19th Dec 2005 22:33
Got it.

I've put the camera calls after designing the board, that worked perfectly.

V

I'm pretty sure I know everything. Doubts are something rare in me and I am never wrong, as this signature can prove.
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 20th Dec 2005 01:26
Ah! Be sure to disable auto camera (dbAutoCamOff() I think) - otherwise whenever you make an object it will automatically positoin the camera to look at it. I always try to make that the first line in my project else I forget completly xD

Login to post a reply

Server time is: 2024-11-19 03:23:52
Your offset time is: 2024-11-19 03:23:52