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 / 3D Camera

Author
Message
Noslon
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location:
Posted: 16th Oct 2012 02:22
Hello guys i need help with, how to setup a 3D camera.
I want to make a camera follow an object and you to move with arrow keys and WASD keys can someone help me?
This is my code so far!
Noslon
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location:
Posted: 16th Oct 2012 20:45
Got new code, here is.
The problem know is that the object is turn around.
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 17th Oct 2012 16:14
If the object is turned around you just add 180 to your object Y rotation.
Noslon
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location:
Posted: 17th Oct 2012 22:29
i already try that but nothing happens this is the code i use
dbRotateObject(2,0,100,0);
and nothing happens i also try it in X and Z and nothing happens D:
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 19th Oct 2012 07:08
Try adding 180 to your "ya" varible when you set the objects rotation in the loop.
Noslon
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location:
Posted: 22nd Oct 2012 19:45
ok i fix it now its looking forward but now theres another problems when i press the up key he moves up not forward and the down key he moves down under the terrain.
darkvee
18
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 27th Oct 2012 23:20
Because your using this dbMoveObject(2,-6

Try setting up z position variable and move it with dbUpKey() then update position.

darkvee
Noslon
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location:
Posted: 1st Dec 2012 00:27
mmm i dont get it sry im new to C++ if someone can explain this more clearly it will be good thanks everyone
Noslon
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location:
Posted: 1st Dec 2012 00:28
and here its my code

Login to post a reply

Server time is: 2024-04-20 12:20:14
Your offset time is: 2024-04-20 12:20:14