WIP Ragdoll

- fixed the "push ups" issue
- now Sinbad knows his up side


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7313 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 14 years ago
parent cffd1ec760
commit 0d4e07f924
  1. 2
      engine/src/jbullet/com/jme3/bullet/control/RagdollControl.java
  2. 10
      engine/src/test/jme3test/bullet/TestBoneRagdoll.java

@ -666,7 +666,7 @@ public class RagdollControl implements PhysicsControl, PhysicsCollisionListener
control = false; control = false;
AnimControl animControl = targetModel.getControl(AnimControl.class); AnimControl animControl = targetModel.getControl(AnimControl.class);
animControl.setEnabled(true); animControl.setEnabled(true);
channel.setAnim(anim, 0); channel.setAnim(anim);
channel.setLoopMode(LoopMode.DontLoop); channel.setLoopMode(LoopMode.DontLoop);
TempVars vars = TempVars.get(); TempVars vars = TempVars.get();

@ -155,9 +155,13 @@ public class TestBoneRagdoll extends SimpleApplication implements RagdollCollisi
q.fromAngleAxis(angles[1], Vector3f.UNIT_Y); q.fromAngleAxis(angles[1], Vector3f.UNIT_Y);
//q.lookAt(model.getLocalRotation().toRotationMatrix().getColumn(2), Vector3f.UNIT_Y); //q.lookAt(model.getLocalRotation().toRotationMatrix().getColumn(2), Vector3f.UNIT_Y);
model.setLocalRotation(q); model.setLocalRotation(q);
// animChannel.setAnim("StandUpBack"); System.out.println(angles[0]+ " "+angles[2]);
ragdoll.blendControlToAnim("StandUpFront",animChannel); if(angles[0]<0){
// animChannel.setAnim("StandUpFront",0.00f); ragdoll.blendControlToAnim("StandUpBack",animChannel);
}else{
ragdoll.blendControlToAnim("StandUpFront",animChannel);
}
} }
if (name.equals("bullet+") && isPressed) { if (name.equals("bullet+") && isPressed) {
bulletSize += 0.1f; bulletSize += 0.1f;

Loading…
Cancel
Save