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 / head shots etc?

Author
Message
Uppy
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location:
Posted: 18th Oct 2003 02:41
i was just wondering, when making a First person shooter, how would you go about determining which part of the body you've shot?
i know you can just shoot the object/person in general and the collision detection will sort the rest out, but what if you want to hit specific parts of the body like head shots and so on?
thanks.
Northern Fist
20
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 18th Oct 2003 03:25
I'd like to know myself. I think that there is a way to do collision with individual limbs. If not then you could do math collision with boxes or spheres that remain attached to the limb or particular part of the model constantly.

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
PoHa!84
20
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 18th Oct 2003 03:27 Edited at: 18th Oct 2003 03:28
Well, there might be an easier way, but it doesn't look like anyone else is giving a suggestion, so I'll try and help:

For each limb that you want to detect if it was hit by a bullet or not, make a sphere/cube/cone/whatever, and hide it. Place each one at a specific spot on the target and detect if it gets hit by the bullet. Probably need a glue command in there somewheres, too.

[posted at same time...]

Destroy you with my mind, I could!
. Cool, he is. Play his games, I do.
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 18th Oct 2003 06:57
You could do it another way as well. You could have a type for the enemies that holds collision data. Which areas are which parts of the body etc. If the bullets array data conflicts with the enemies array data, then you know where it hits

RPGamer

Current Project: Eternal Destiny WEBSITE SOON!
"Thats not a bug! Its a feature!" - _ESC
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 18th Oct 2003 16:46
@ RPGamer
that seems to be hard one, could you give an example.

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Oct 2003 21:55
Why not just work out the height of the collision?

You know the angle of fire, the start height and the distance (or can work them out), so you can just use that to work out the collision height ... if it's above a certain height, it must be a headshot.

For example, if your gun height is 10, the angle of fire is 2 degrees upwards, and the distance is 50, then the following line will give you the height of the collision.



Use negative numbers for upward angles, positive numbers for downward angles.
hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 20th Oct 2003 15:33
if your using dbpro and you models use limbs simply use the "limb collision" command, if your using dbclassic i'd suggest using PoHa!84's method (hide the collision objects), it's very easy and very accurate!

Login to post a reply

Server time is: 2024-09-21 05:40:22
Your offset time is: 2024-09-21 05:40:22