xenno
Member
|
Hit precision on characters
Hi, time without play with esenthel engine , but now i have time and i return to my game
My goal today was try to get a precision shoots on enemies, that is, try to know wich part of body was hit.
Ok, capsule is the easy way for to know if i shot an enemy, but they can die shooting near them, so i need more precision.
My second attempt was to create an auxiliar ragdoll on my enemies, but my problem come when i need to know wich "bone" was hit by my ray.
How can i know wich part of ragdoll was hit by ray? I see that Ragdoll can ignore a ray, so i think its posible to do.
Any suggestion?
Sorry for my english XP
My PC:
Proccessor: Core2 Quad Q9650
Ram: 4GB
HD: 500 Gb
Video Card: 285GTX 1Gb
Microsoft Windows Vista
|
|
06-07-2009 06:58 PM |
|
Esenthel
Administrator
|
Re: Hit precision on characters
Hi,
Yep you can use an additional ragdoll set each frame (just like in physical clothing tutorial)
or do manual detection according to skeleton bones.
I'll add this as a tutorial to create in the future
|
|
06-08-2009 01:59 PM |
|
katoun
Member
|
RE: Hit precision on characters
Hello,
Dosen't work with the actual ragdoll of the character?
I saw in the Characte Ragdoll tutorial for the hit simulation witch is super this:
Quote:chr.ragdoll.findActor
Dose that mean tha while the character is animated the ragdoll's actors are updated coresponding the the animation of the skeleton?
If not that would be usefull for detecting wich actor was hit and from what direction and add force to that actor to do a very correct hit.
|
|
11-04-2009 09:01 PM |
|
Esenthel
Administrator
|
RE: Hit precision on characters
Quote:Dose that mean tha while the character is animated the ragdoll's actors are updated coresponding the the animation of the skeleton?
not in this tutorial, but it happends in "physical clothing" tutorial
yes you can use the actors to detect collision detection, or you can use Shapes (like capsule), by getting them from transformed bone positions
|
|
11-04-2009 09:09 PM |
|
Chris
Member
|
RE: Hit precision on characters
I'm doing something similar to this, but am having problems getting the actor of the bone under the phys_hit, my current attempts don't return anything when firing a ray of custom group type AG_KINEMATIC_RAGDOLL.
1. I'm using a helper ragdoll as in "physical clothing". Please can you expand as to how to do a phys_hit returning the ragdoll bone cast as an actor object? (for doing stuff like grabbing, adding forces, impluses, etc).
2. Also, is it possible to set how long chr.ragdollBlend() works for?
3. Is there a better way to recover from a ragdollEnable without teleporting? Perhaps by blending to a recovery position, then a crouch position, then a stand?
|
|
01-17-2010 11:55 PM |
|
Esenthel
Administrator
|
RE: Hit precision on characters
Hi,
1. you can use Actor::user and for example store there the index of the ragdoll bone
for example:
ragdoll.bone(3).actor.user(Ptr(3))
2. currently not, I'm not planning to increase the duration, because when switched to ragdoll it can fall very far, and then the blending back could be very unrealistic (it could linearly blend from 2 meters for example)
3. yes, but that's a complex situation, and currently not supported
|
|
01-18-2010 05:43 PM |
|