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 / help with 3rd person view

Author
Message
Wi1dcat Man
15
Years of Service
User Offline
Joined: 15th Feb 2009
Location: United States
Posted: 15th Feb 2009 15:41
I'm trying to make a game and I'm new and i can't find any tutorials on making 3rd person view for a game.

Can someone tell me how to or post a code for it?

Thanks.
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 15th Feb 2009 20:05
Basically all you do is load your player's model:

Then just set up the camera so it's viewing the player, and when the player moves make the camera move, and when the player turns make the camera turn. There are easier work arounds but that's the core of it.
Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 15th Feb 2009 22:28
set camera to follow?

Use the google search at the bottom of the page and you will hopefully find a tutorial on how to use it. Dont remember who wrote it, but it was a mod... With a frog as avater.. OH! Cant remember his name, he is such a genius.

Keep it simple.
Questions? Mail me
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 15th Feb 2009 22:50
dbSetCameraToFollow()
Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 16th Feb 2009 00:07
eh-h.. U dont say so?





Keep it simple.
Questions? Mail me
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 16th Feb 2009 15:39
Haha, I do say so.
Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 16th Feb 2009 15:44
Then ur smart ^^,

Is it working Wi1dcat Man?

Keep it simple.
Questions? Mail me
Wi1dcat Man
15
Years of Service
User Offline
Joined: 15th Feb 2009
Location: United States
Posted: 16th Feb 2009 22:34
Hey, thanks everyone for the help.

I couldn't really figure out the dbSetCameraToFollow(), but I found another way that looks pretty good, but I'm not going to keep it.

I just have one more question, how do you set different keys to do animations, like Ctrl for crouch, and I have the numbers you need for dbLoopObject() I just need to know how to set that animation for the key, and Spacebar for jump and stuff, thanks.

By the way, I got the 3rd person working by setting an object in the view of the camera and using dbLockObjectOn() for it to stay their, and then I control the camera using the arrow keys, so it kind of looks like he's walking.

Wi1dcat Man
15
Years of Service
User Offline
Joined: 15th Feb 2009
Location: United States
Posted: 16th Feb 2009 23:43 Edited at: 17th Feb 2009 03:26

when i press 'W' key, my guy would start walking forward with the animation, but when i added the animation for crouch, it does the crouch, but no longer will do the walking animation when i press 'W' and i set for crouch to be the 'Ctrl' key if that has anything to do to it, if you can help with this thatll be nice, thanks.
Gatorules
15
Years of Service
User Offline
Joined: 17th Dec 2008
Location:
Posted: 17th Feb 2009 04:47
this is what the stack is going through:

1. press W so the computer gets sent info saying to play that animation but doesnt show a new image until the sync command.
2. since W is being pressed Control cant be pressed, which means that its keystate is 0 so the computer is told to set the animation accordingly.
3. the sync command shows up and the computer displays the set animation which is that of "584" or stopped

to fix this say:
if (press W)
{play walking animation}
else if (press Control)
{play crouched animation}
else
{play stopped animation}
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 17th Feb 2009 20:51
Well i don't know if i'm reading your question right Wi1dcat Man but if you want the player to play the walking animation on W or play the crouch walking animation on W press then do:

Wi1dcat Man
15
Years of Service
User Offline
Joined: 15th Feb 2009
Location: United States
Posted: 18th Feb 2009 02:29
thanks everyone for your help, I got 3rd person view down now, but the animations are troubling me, and since I was getting off topic on this I'll start a new post, thanks again!

Login to post a reply

Server time is: 2024-11-25 13:19:25
Your offset time is: 2024-11-25 13:19:25