Inside3D!
     

Model Area Specific Damage

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Team Xlink



Joined: 25 Jun 2009
Posts: 320

PostPosted: Mon Nov 16, 2009 8:39 pm    Post subject: Model Area Specific Damage Reply with quote

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
View user's profile Send private message
lth



Joined: 11 Nov 2004
Posts: 129

PostPosted: Mon Nov 16, 2009 10:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
metlslime



Joined: 05 Feb 2008
Posts: 177

PostPosted: Mon Nov 16, 2009 11:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
Downsider



Joined: 16 Sep 2008
Posts: 478

PostPosted: Tue Nov 17, 2009 1:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Team Xlink



Joined: 25 Jun 2009
Posts: 320

PostPosted: Tue Nov 17, 2009 2:17 am    Post subject: Reply with quote

Thank you for the help.


I got it working.
_________________
Anonymous wrote:
if it works, it works. if it doesn't, HAHAHA!
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Tue Nov 17, 2009 3:14 am    Post subject: Reply with quote

if ((trace_endpos-ent.origin)*'0 0 1' > 0.7)
shotfromabove();
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group