05-13-2012, 08:04 PM
(This post was last modified: 05-13-2012, 08:06 PM by MirceaKitsune.)
(05-13-2012, 06:20 PM)nowego4 Wrote: So if I'm understanding this correctly, you're basically creating bounding boxes for each bone (i.e., not using the player mesh). Would this be prone to holes (and overlaps)? I guess I'm unclear on how it's actually receiving the damage, as animation bones have no physical area.
No, the bones don't have bounding boxes. Basically, I know the origin where the damage took place. Next I loop through all skeletal bones of the player model, and read each bone's origin. Using a vlen, I then get the distance between each bone and the point of impact. Then use this to calculate if the bone was in range of the blast, and deal the appropriate damage if any it so be dealt.
So there's no bbox scanning... I only loop and scan the origins, then tell distance based on that. Note that projectiles themselves still explode when they hit the bounding box as usual... just that damage isn't calculated for that any more.
(05-13-2012, 07:10 PM)FruitieX Wrote: I'm in favor of this, even by default if you find a way to make it so that damage calculations work the same for any model.... Don't think the model you select should really have any effects on gameplay!
Sadly I don't see one. If I use skeletal bones to calculate damage, I'm using the player's animation skeleton, which depends on model. But on the good side, almost no model should be using a custom skeleton. So with the default models in Xonotic at least, there should be no difference.