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 Professional Discussion / mario Kart camera

Author
Message
Graysire
10
Years of Service
User Offline
Joined: 18th Oct 2013
Location:
Posted: 25th Feb 2014 05:05
How would you go about making a camera similar to Mario cart? I don't need specific code, but I do need a structure for it
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 25th Feb 2014 08:46
I wanted to suggest SET CAMERA TO FOLLOW to you, so I Googled it to check the Syntax before posting. The result was a very useful thread...

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

wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 26th Feb 2014 02:40
I think even if I was going to make a fps I'd still use the set camera to follow command. Just makes everything look professional.

New sig coming soon..
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 26th Feb 2014 15:41
I wouldn't use set camera to follow for an fps. I'd just position the camera at the player location. Why complicate it?

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Feb 2014 21:47
Quote: "I wouldn't use set camera to follow for an fps. I'd just position the camera at the player location. Why complicate it?"


It can be a good idea. Set the parameters tight and you'll get a nice acceleration/deceleration effect with no calculations required. Doing it this way, you make your character position the same as the camera rather than the point you are using as the camera destination.

tiffer
18
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 27th Feb 2014 11:39
How about this for simplicity.
(pseudo)
Position then camera on the player.
Rotate it the same way as
player
move camera backwards.

Cwatson
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 27th Feb 2014 20:05
Quote: "How about this for simplicity.
(pseudo)
Position then camera on the player.
Rotate it the same way as
player
move camera backwards."

I've done this, but SET CAMERA TO FOLLOW also adds some nice lerp on the rotation like Batvink mentioned. Plus, it's arguably simpler - just one command .

tiffer
18
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 28th Feb 2014 17:53
My way gives you the potential for more control

I await your retort

Cwatson
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 1st Mar 2014 05:56
Well, you just have to weigh your needs. If SET CAMERA TO FOLLOW does exactly what you need, you use it. If it doesn't, your write your own. Not here to say that any one solution is the be-all end-all of third-person cameras (though Shadow of the Colossus' implementation is pretty spectacular ).

Login to post a reply

Server time is: 2024-04-20 09:00:31
Your offset time is: 2024-04-20 09:00:31