Brainache
Member
|
Character Collision & Hitboxes
I am looking for a way to add more detailed collisions between objects.
For example, CHR objects currently collide only against a capusile based phys object, this is usualy fine for movement, however in the case wear an object is mounted on the character ( for example - a sword that extends beyond the capsule ) it allows other capsule-based CHR objects to pass through it - I would like that to cause a collision ( at least as if the cpasules had collided)
I am also looking for the ability to detect where on a model a collision occured. My initial thought was to create bounding boxes based on the skeleton ( extended a bit ) and then do collision checkes with these boxes against a bounding box of a sword ( or a projectile) for example to determine where the hit occured.
Tied into this is also... even though collision occurs with the capsule - it may not actually occur against the model... I would think that whatever approach solved issue 2 would solve this...
Basically - How can we handle collision beyond the capsule for CHR objects, allowing more realistic FPS type collisions?
Thanks!
|
|
05-22-2009 12:15 AM |
|
Esenthel
Administrator
|
Re: Character Collision & Hitboxes
Quote:For example, CHR objects currently collide only against a capusile based phys object, this is usualy fine for movement, however in the case wear an object is mounted on the character ( for example - a sword that extends beyond the capsule ) it allows other capsule-based CHR objects to pass through it - I would like that to cause a collision ( at least as if the cpasules had collided)
This is rather hard to do
Quote:I am also looking for the ability to detect where on a model a collision occured. My initial thought was to create bounding boxes based on the skeleton ( extended a bit ) and then do collision checkes with these boxes against a bounding box of a sword ( or a projectile) for example to determine where the hit occured.
You can access the current skeleton pose (each of the skeleton source bones (from Skeleton) and transform each by controlled skeleton bone transformation matrix (CSkeleton->bone->matrix)
Skeleton.bone * CSkeleton->bone->matrix = bone in world space
then you have each character bone in world space and you can use distance detection
Quote:Basically - How can we handle collision beyond the capsule for CHR objects, allowing more realistic FPS type collisions?
don't use per-character capsule detection but use per-bone detection
however for Esenthel RPG I didn't use per-bone detection but only I've calculated the angles between the characters and distance between them, and it worked just fine
|
|
05-23-2009 04:11 PM |
|
Brainache
Member
|
Re: Character Collision & Hitboxes
Quote:
For example, CHR objects currently collide only against a capusile based phys object, this is usualy fine for movement, however in the case wear an object is mounted on the character ( for example - a sword that extends beyond the capsule ) it allows other capsule-based CHR objects to pass through it - I would like that to cause a collision ( at least as if the cpasules had collided)
> This is rather hard to do
Could it be done by allowing more than just a capsule for the character controller? Ie: using ActorCD for the character controller... and allowing items to be added and removed?
|
|
05-25-2009 10:36 PM |
|
Brainache
Member
|
Re: Character Collision & Hitboxes
Hmm.. I overlooked this statement:
"don't use per-character capsule detection but use per-bone detection"
Is per-bone detection already available? or do I need to add that?
|
|
05-26-2009 09:31 PM |
|
Esenthel
Administrator
|
Re: Character Collision & Hitboxes
Quote:Could it be done by allowing more than just a capsule for the character controller? Ie: using ActorCD for the character controller... and allowing items to be added and removed?
no because Items are always animated (dynamically change their positions)
Quote:Is per-bone detection already available? or do I need to add that?
you'd need to do this manually
via various 'Cuts' functions
or to create an additional ragdoll (just like in character physical clothing tutorial), then you can use Physics. collision detection functions on the ragdoll bone actors
|
|
05-26-2009 10:15 PM |
|