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.

Author
Message
urgent help!
15
Years of Service
User Offline
Joined: 28th Sep 2010
Location:
Posted: 28th Sep 2010 19:41
Ok so I need to have a camera that follows my character around, in 3rd person view. Problem is, I'm very new to this programming and cannot figure it out. I was wondering if someone could get me a code for 3rd person view, or show me something that could teach me how to program obe into the game? I've tried plenty of other
code
I have found throughout the internet plenty of other camera code; but not a single camera code has seemed to work for my game.
MSon
22
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 28th Sep 2010 23:31 Edited at: 28th Sep 2010 23:34
This is some old code i had in the Code Snippets board, but it needs the free Matrix1 DLL's to be installed



But if you use the search box below, then you will find lots of other versions which people have done, but if you read the code above, it should give you an idea of how to do it in a way more suited to your game.

urgent help!
15
Years of Service
User Offline
Joined: 28th Sep 2010
Location:
Posted: 29th Sep 2010 20:18
thanks but I can't get that installed.
if anyone has a simple following code please post it. All im trying to start out with is make the camera follow a cube around.
I also tried to make my own camera and this is how far I got.
make camera (6)
do
if Upkey()=1 then move camera 6,1
loop

I know I'll have to add more to make the camera move side to side or rotate, but for now I'm trying to keep the camera fairly simple. Any sugestions,help, or code would be greatly appreciated
enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 30th Sep 2010 00:58 Edited at: 30th Sep 2010 00:59
Might try something like this...



Copy it into your editor, it will be easier to read...

- enderleit
Gael
15
Years of Service
User Offline
Joined: 27th Sep 2010
Location: Athens .
Posted: 30th Sep 2010 05:21
hello
Try this




UPKEY - move object
DOWNKEY-move backwards
LEFT KEY-turn object left
RIGHT KEY-turn object right

mouse to LEFT SIDE of screen or RIGHT SIDE of screen will change the follow cameras angle on the object
mouse to TOP or BOTTOM of screen will change the follow cameras height
mouse wheel movement will change the distance of the follow camera
LEFT CLICK Will allow twisting of the follow camera
RIGHT CLICK Will give a 10 second slow motion effect to the scen
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 30th Sep 2010 15:57
MSon's example was elegant! Why can't you get it implimented?

The fastest code is the code never written.
urgent help!
15
Years of Service
User Offline
Joined: 28th Sep 2010
Location:
Posted: 30th Sep 2010 19:37
Thank you all for your help enderleit and Gael you both gave me amazing codes and I can finally get going with my game thank you very much! Now all I need to figure out is collisions and i'll be set. Give both of your selves a pat on the back
urgent help!
15
Years of Service
User Offline
Joined: 28th Sep 2010
Location:
Posted: 30th Sep 2010 19:44
I have decided to go with enderleits code because of easiness of use. Plus you did a fantastic job of explaning in the code, what each code does. Making it easier to read and expanding my knowledge in the programming world, helping me as a amature.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Oct 2010 14:52
Nice name by the way... I know how you feel!

enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 1st Oct 2010 20:29
Glad I could help.

- enderleit
Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 2nd Oct 2010 03:13
I know that this problem is solved but here is a tutorial on the SET CAMERA TO FOLLOW command that could be useful to you

http://forum.thegamecreators.com/?m=forum_view&t=123485&b=10


Guns, cinematics, stealth, items and more!

Login to post a reply

Server time is: 2026-07-23 15:49:29
Your offset time is: 2026-07-23 15:49:29