View previous topic :: View next topic |
Author |
Message |
Team Xlink
Joined: 25 Jun 2009 Posts: 320
|
Posted: Mon Nov 16, 2009 8:39 pm Post subject: Model Area Specific Damage |
|
|
Solved _________________
Anonymous wrote: | if it works, it works. if it doesn't, HAHAHA! |
Last edited by Team Xlink on Tue Nov 17, 2009 2:18 am; edited 1 time in total |
|
Back to top |
|
 |
lth

Joined: 11 Nov 2004 Posts: 129
|
Posted: Mon Nov 16, 2009 10:49 pm Post subject: |
|
|
I did this in my Black Ops mod by specifying a head height in every single animation frame for every model. Even then, it was not very accurate at all, since hitscans hit the outside of the bounding box. If you use Darkplaces you can set hitscans to trace against the alias model instead of the bounding box, and therefore you could then set a pair of vectors to specify the location of the head in each frame. _________________ randomviolence - tactical combat boardgame |
|
Back to top |
|
 |
metlslime
Joined: 05 Feb 2008 Posts: 177
|
Posted: Mon Nov 16, 2009 11:04 pm Post subject: |
|
|
i was thinking about this recently. This is pretty vague, but you could:
1. test the initial traceline against the standard bbox
2. if it's a hit, create a smaller temporary entity with a bbox around the "vulernable" spot
3. do another trace ignoring the larger box (maybe set the .owner field or something similar to accomplish this)
4. if the smaller box is hit, apply the special damage. if it's a miss, apply the base damage. |
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 478
|
Posted: Tue Nov 17, 2009 1:50 am Post subject: |
|
|
It's probably easier to do the regular trace, then write a special trace builtin that would trace against the alias model.. I believe there's an article on alias model collision, I've seen it before. |
|
Back to top |
|
 |
Team Xlink
Joined: 25 Jun 2009 Posts: 320
|
Posted: Tue Nov 17, 2009 2:17 am Post subject: |
|
|
Thank you for the help.
I got it working. _________________
Anonymous wrote: | if it works, it works. if it doesn't, HAHAHA! |
|
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Tue Nov 17, 2009 3:14 am Post subject: |
|
|
if ((trace_endpos-ent.origin)*'0 0 1' > 0.7)
shotfromabove(); _________________ What's a signature? |
|
Back to top |
|
 |
|