About Store Forum Documentation Contact



Post Reply 
Hit precision on characters
Author Message
xenno Offline
Member

Post: #1
Hit precision on characters
Hi, time without play with esenthel engine , but now i have time and i return to my game lol

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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
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 smile
06-08-2009 01:59 PM
Find all posts by this user Quote this message in a reply
katoun Offline
Member

Post: #3
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. grin
11-04-2009 09:01 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
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
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #5
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
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
Find all posts by this user Quote this message in a reply
Post Reply