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 / Good 3rd Person View Tutorial

Author
Message
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 1st Jun 2009 22:45 Edited at: 2nd Jun 2009 23:46
Here is very well commented code to create a decent 3rd person view.
(contains two functions)


I hope that works for anyone who needs it, if there are bugs I missed feel free to post!

Skynet Games
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: At home, building stuff.
Posted: 2nd Jun 2009 05:47 Edited at: 2nd Jun 2009 05:48
A LOT! of errors there mate. Wow, i just checked it out, and theres a lot right there.. it ranged from 4 all the way to 31 errors...

We create games of tomorrow so you can play for the future
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 2nd Jun 2009 06:56
You must have done something wrong. >.<

jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 2nd Jun 2009 19:54
Can I suggest using
void Create_Character(unsigned int ObjNum);
and
void Camera_Control(unsigned int ObjNum);

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 2nd Jun 2009 22:41
Why say unsigned?

jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 2nd Jun 2009 23:18
because it is never going to be negative.

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 2nd Jun 2009 23:47
Updated to jezza's request

Travis Gatlin
15
Years of Service
User Offline
Joined: 14th May 2009
Location: Oxford, Alabama
Posted: 5th Jun 2009 20:25
you did do alot of things wrong! (no offense) it gave me 37 errors!
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 5th Jun 2009 22:11
He didn't do anything wrong, you just have to use some common sense such as...

1. Put the required model into the same folder as source
2. Inlude the #include "DarkGDK.h" line and the main loop
3. Put Camera_Control into the main loop, and Create_Character before the main loop

If you do that then it will work, and if it doesn't then you are missing something, but his code works.

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 5th Jun 2009 23:09
Thanks, heyufool1, you are completely correct, my tutorial is perfect for people just learning how to create 3rd person views.

AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 5th Jun 2009 23:19
Wouldn't it be easier to use the dbSetCameraToFollow command?

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 5th Jun 2009 23:22
Sure, if you wanted only one constant angle for your camera on the Y axis, which can be quite annoying for some games, it all depends on what you need accomplished.

Login to post a reply

Server time is: 2024-10-01 03:28:22
Your offset time is: 2024-10-01 03:28:22