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 / First person collision

Author
Message
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 15th Nov 2003 17:06
I can do a 3rd person collision but how do you give collision to a first person game?

hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 15th Nov 2003 19:06
you make a camera object (cube, sphere, whatever) and calculate collision as you would for 3rd person but just position the camera where your camera object is rather than controlling it seperately and freely. So when your camera object doesn't move through a wall, your camera won't move through 'cus it's been positioned at the exact same place.

HIH

TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 17th Nov 2003 14:37
How do you position the camera there?

D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 17th Nov 2003 22:00
for example, a box.


‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
Carlitos
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 18th Nov 2003 20:48
Or you can use the exact method you use for 3rd person except:
1:Make a cube
2:Hide the cube
3osition it at the cameras position
This will also do the same thing as what 01DIGITAL10 stated.

Login to post a reply

Server time is: 2025-05-21 16:22:53
Your offset time is: 2025-05-21 16:22:53