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.

DarkBASIC Discussion / 3rd perspective camera

Author
Message
dazzling dazzla
20
Years of Service
User Offline
Joined: 6th Nov 2004
Location: here
Posted: 8th Mar 2005 22:57
Does anyone know where I can get a tutorial other than monster hunt, for writing a 3rd person camera. Or could you write one as an example anyone?

the answer to all lives questions is...
... meh!
nemo85
20
Years of Service
User Offline
Joined: 4th Jan 2005
Location: Milky Beans
Posted: 12th Mar 2005 02:07 Edited at: 12th Mar 2005 02:13
Ok im a total noob, but this is some code that will create a person made of primitives, this person stays with the camera in 3rd person, alternatively you could just load a single pre made model and use that!



of course you would have to sort your camera control/movement, but this would make sure that wherever your camera goes so does your chosen object.



PS i realise the code isnt very user friendly, but i havent got into the habbit of making it look pretty yet!

EDIT: Heres a pic of it working...

Attachments

Login to view attachments
dazzling dazzla
20
Years of Service
User Offline
Joined: 6th Nov 2004
Location: here
Posted: 12th Mar 2005 23:39
Thanks mate, but im looking for some code to help me understand how to make the camera follow the object tomb raider style, you know 3rd person perspective.

the answer to all lives questions is...
... meh!
Robot
21
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 15th Mar 2005 00:49
the sliding collision code in the help section has a good example

The happenings of tommorow are behind us now
nemo85
20
Years of Service
User Offline
Joined: 4th Jan 2005
Location: Milky Beans
Posted: 15th Mar 2005 02:21
Well the example i gave would also work for a Tomb Raider effect, u just gota change the z position of ure player object a lil, simple as.

bibz1st
22
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 20th Mar 2005 20:26
whats wrong with SET CAMERA TO FOLLOW ?
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 21st Mar 2005 23:59 Edited at: 22nd Mar 2005 06:26
There's two ways you could do it.

Like This: (The Trig Way)


Or Like This: (The Easy Way, No Trig)


To learn what parammeters the "Set Camera To Follow" needs just look in the DB help menu.

Then if you wanted you could add staffing and stuff too. Hope that helps

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 22nd Mar 2005 00:46
3rd person cams are easy. Just position the camera a little above and behind a player. Sounds easy doesn't it?

In practice it can eb a bit harder depending on how you do it. The best way to position thecamera behind an object is to use trig to extrapolate co-ordinates. If you can't do that, haev a look at newxvalue() nad newzvalue().

The easiest way is to simply use the command SET CAMERA TO FOLLOW. It automatically positions the camera in a third person view when given x,y,z coords of your character and you character's Y angle.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 24th Mar 2005 05:03
if u use the newxvalue/newzvalue. u can use the curvevalue for some extra effect.

Login to post a reply

Server time is: 2025-05-31 05:47:47
Your offset time is: 2025-05-31 05:47:47