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 / 3rd Person Camera Questions

Author
Message
Bluethunder
15
Years of Service
User Offline
Joined: 12th Aug 2009
Location:
Posted: 4th Oct 2009 06:05
Hey, I'm sort of new to DarkGDK. I was trying to create a 3rd person camera that would follow your character around while he moved. I also wanted to be able to right click and drag to rotate the camera thats behind the character, and then continue moving the character while preserving that camera rotation, but the camera still staying behind the character.

This is what I have so far...


The problem is that the dbSetCameraToFollow doesn't seem to work? When it's commented out, I get the wheel loaded and then I can see it and move it around in front of the camera. When I uncomment the commented code, I just get a green screen.

Someone please help! This has been confusing me for several days...
Bluethunder
15
Years of Service
User Offline
Joined: 12th Aug 2009
Location:
Posted: 4th Oct 2009 21:01
Anyone?
Bluethunder
15
Years of Service
User Offline
Joined: 12th Aug 2009
Location:
Posted: 5th Oct 2009 01:42
This is still confusing me... a reply of any sort would be nice... o.O
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 5th Oct 2009 02:17 Edited at: 5th Oct 2009 02:17
this



read this
http://forum.thegamecreators.com/?m=forum_view&t=123485&b=10
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 5th Oct 2009 04:25
You are assuming camera 1 is the default GDK camera. It is NOT. Camera 0 (Zero) is the default camera in GDK, you are calling some commands and passing in camera 1, and others you are passing no camera value, so it will use the default camera, which is 0.

You can call dbSetCurrentCamera(int iCamID); to set the default camera to something other than 0... then when you call for instance :

dbYRotateCamera(dbObjectAngleY(1));

it will use the new default.

Of course, it would just be alot easier to reference the camera you intend to affect in the command, so using the above command again it would look like :

dbYRotateCamera(1, dbObjectAngle(1));

If it ain't broke.... DONT FIX IT !!!

Login to post a reply

Server time is: 2024-11-20 13:34:00
Your offset time is: 2024-11-20 13:34:00