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 / First person collision?? (Help wanted)

Author
Message
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Aug 2010 06:37
I know how to add first person view, but for my player, I don't want to make a person and since the camera won't be able to see the person I shouldn't need one unless im making human enemies. Ok so what would be the best object to use for the collision? box (or would it be to wide?)? sphere (this is what im thinking)?

Since i can make guns but not people I figure this would be the best way of doing things.
Thanks guys!!
Have a chicken

Vista
DBpro 7.4 or 7.5 (don't remember)

I want coke, not Pepsi!
Rampage
18
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 4th Aug 2010 06:56
Camera collision ? All first person really is, is a person moving the camera around with the wasd keys and looking around with the mouse.


Eidos!
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Aug 2010 07:08
uhh, i think id prefer to do something else, would something like a sphere work though?

I want coke, not Pepsi!
Rampage
18
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 4th Aug 2010 09:45
Well I guess if you set it up correctly. But it wouldn't be 'proper' to set up a system like that when it can easily be achieved with camera collision, as you will have to have a camera for the 'eyes' no matter what.


Eidos!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 4th Aug 2010 10:50
I would suggest using Sparky's collision but below is a comprehensive collision resource:
http://forum.thegamecreators.com/?m=forum_view&t=95770&b=7

CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Aug 2010 19:57
I know how to do collision baxslash, didn't you see mine and hawkbloods 70 page thing?
Anyway I wouldn't know how to make the camera jump and stuff, and I don't want to learn seeing as how I just learned normal collision.

I want coke, not Pepsi!
Interplanetary Funk
16
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 4th Aug 2010 20:13
What I do is to simply use a box for collision and use a custom gravity function, simply move the box and set the camera to the boxes position. Though a lot of people will probably say that's a bad way to do things, but it's always worked for me.
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Aug 2010 20:33
planet that's how I do it. I was gonna use a sphere or maybe a tube if I can because a cube is a bit to wide. Or I could use a box and something like x 5-10 y10-15 z5-10

I want coke, not Pepsi!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Aug 2010 10:20 Edited at: 5th Aug 2010 10:30
Quote: "I know how to do collision baxslash, didn't you see mine and hawkbloods 70 page thing?"

No I didn't, not sure I understand your question in that case...

The easiest way by far for camera collision is to use the sphereslide functions that come with sparky's (hence my post).

Jumping etc. is really easy using this system. Attached an example of simple camera collision using sparky's (if you go into first person mode).

Sorry if you think I'm being patronising I just thought you were asking "What's the best camera collision?" and IMO it's sparky's. Using this method you don't actually need an object for the player as it uses spherecasting not the object itself...

This is not the only way but I do believe it to be the best and most accurate solution. Learning the best way to do this would not be a waste of your time, trust me.

Login to post a reply

Server time is: 2026-07-25 17:50:17
Your offset time is: 2026-07-25 17:50:17