Hi
i try to simulate hit my personage.
when i do as in example it's near one second when chr in falling mode(blend mode)
there is a way to increase time for this mode?
there is a way to set parameter of blending?
Actually i want to make it manually:
1) chr.ragdollEnable (); //acto start falling
2) stop falling and start slowly moving ragdool actors to chrs bones
i try to use for this kinematic move to , but unsuccessfully.
need a tutorial
or so
Ragdoll.Bone *bone=ragdoll.findBone(8"Bone_010" ); bone.actor.orn(cskel.findBone(8"Bone_010").orn);
aa ok.... cskel is follow to ragdol in .ragdollEnable mode...i need to save cskel positions before go in ragdollEnableMode
looks like that in ragdool enable mode is bad idea moving ragdools actors
Code:
if(Chrs.elms())
{
Game.Chr &chr=Chrs[0];
if(Kb.bp(KB_1)) {m = chr.cskel.findBone(8"Head").matrix(); chr.ragdollEnable ();} // switch to ragdoll
if(Kb.bp(KB_2))chr.ragdollDisable(); // switch to skeleton animation
if(Kb.bp(KB_Q))if(chr.ragdollBlend())if(Ragdoll.Bone *bone=chr.ragdoll.findBone(8"Head" ))bone.actor.addVel(Vec(0, 0, 30));
if(Kb.bp(KB_W))if(chr.ragdollBlend())if(Ragdoll.Bone *bone=chr.ragdoll.findBone(8"Body" ))bone.actor.addVel(Vec(0, 0, 30));
if(Kb.bp(KB_E))if(chr.ragdollBlend())if(Ragdoll.Bone *bone=chr.ragdoll.findBone(8"FootR"))bone.actor.addVel(Vec(0, 0, 40));
if(Kb.bp(KB_R))if(chr.ragdollBlend())if(Ragdoll.Bone *bone=chr.ragdoll.findBone(8"HandR"))bone.actor.addVel(Vec(0, 0, 40));
if(Kb.bp(KB_I)) if(Ragdoll.Bone *bone=chr.ragdoll.findBone(8"Head" )) bone.actor.matrix(m);
if(Kb.bp(KB_J)) if(Ragdoll.Bone *bone=chr.ragdoll.findBone(8"Head" )) bone.actor.kinematicMoveTo(m);
//Cam.setSpherical(Cam.at, Cam.yaw-Ms.d().x, Cam.pitch+Ms.d().y, 0, Max(0.1, Cam.dist*ScaleFactor(Ms.wheel()*-0.2))).updateVelocities().set();
}
if i use ragdoll via editor ...not for every bone i cant use Ragdoll& toSkelBlend(CSkeleton &cskel, Flt blend );?