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.

Newcomers DBPro Corner / Raycasting with the PICK OBJECT command.

Author
Message
btharding
10
Years of Service
User Offline
Joined: 17th Aug 2014
Location:
Posted: 1st Oct 2015 18:00
I am looking at making a doom style fps and I found out that they use a process called raycasting.
While researching possible ways to do that in dbpro I came across this command - http://dbprohelp.wikia.com/wiki/PICK_OBJECT
I was wondering if I could use that command to create a raycasting engineout of a 2d map.

Cheers in advance
If women ran the world we wouldn\'t have wars, just intense negotiations every 28 days.

Robin Williams
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Oct 2015 01:56
btharding wrote: "I am looking at making a doom style fps "


btharding wrote: "I was wondering if I could use that command to create a raycasting engineout of a 2d map."




Elaborate please...
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 2nd Oct 2015 21:02
I would think the way to do this is to use textured planes pointing toward the camera to display the NPC's. You would then raycast from the tip of the player's gun, following the angle of the gun out a certain distance and you would check (via raycast) to see if any of the NPC planes are intersected (and the walls too, of course). I suppose you could use the Intersect Object command to do the same thing.

I have no idea what you are talking about with regard to a 2D map and I can't see how pick object would help with that.
So many games to code.....so little time.
Derek Darkly
13
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 4th Oct 2015 15:09
Yeah, INTERSECT OBJECT is the way to go for bullet collisions, and some people even use it for determining the ground height in relation to the player.
It's one of the best native DBP commands I've used. No need for special engines or maps this way!

Login to post a reply

Server time is: 2024-11-21 12:50:41
Your offset time is: 2024-11-21 12:50:41