Well, my car can kill characters, and they avoid me when try to run over them. To be honest i've only calculated a simple vector oposite to car movement (easy kill) and perpendicular (hard =ยบ)
Now i see that my collisions seems to be poor acurate, because character actor ( capsule ) go too far from real body and i want to check aditional info in contacts so i want to use character's ragdoll as info for contacts supply.
I tried to figure out how to do this for several days (20 for now XD). I assign group id for ragdolls bones, and well , it's dificult to remember all i did.
My own logic claim to be something like:
Check contact with character Capsule, if exist, check for all raggdoll's bones contacts, but i can't get it work =/
Any help? Thanks ^.^
[EDITED]
Ok, finaly back to home, since my boss tell us that we must finish the floor today. Yai my shoulders XD
Well, that was i think about
Code:
struct CarCollision : PhysCutsCallback // Physical Cuts Test Callback
{
virtual Bool hit(Int group, Ptr user, Game::Obj *obj)
{
if (obj)
{
//Maybe group would be the best choice, but for test it's fine XD
if(Game::Chr *chr=CAST(Game::Chr,obj))
{
for(int i = 0; i < chr->ragdoll.bones() ; i++)
{
//some thing like that?
chr->ragdoll.bone(i).actor.cuts(...); //Check collision with all bones's actor?
}
//chr->ragdollEnable();
}
}
return false;
}
}CarCollisionInfo;
Ok, that was my idea. A little bit brute? XD
I try to know if
Code:
Physics.cuts(TestCollisionShape,CarCollisionInfo);
iterate through all contacts, but seems to react only to first one? Character's actor in this case :S
I'm confused, some trick?