/** * Create a shallow clone for the JME cloner. * * @return a new control (not null) */ @Override public Object jmeClone() { KinematicRagdollControl control = new KinematicRagdollControl(preset, weightThreshold); control.setMode(mode); control.setRootMass(rootMass); control.setWeightThreshold(weightThreshold); control.setApplyPhysicsLocal(applyLocal); control.spatial = this.spatial; return control; }
/** * Create a shallow clone for the JME cloner. * * @return a new control (not null) */ @Override public Object jmeClone() { KinematicRagdollControl control = new KinematicRagdollControl(preset, weightThreshold); control.setMode(mode); control.setRootMass(rootMass); control.setWeightThreshold(weightThreshold); control.setApplyPhysicsLocal(applyLocal); control.spatial = this.spatial; return control; }
KinematicRagdollControl ragdoll = new KinematicRagdollControl(0.5f); sinbad.addControl(ragdoll);
@Override public void simpleInitApp() { BulletAppState bulletAppState = new BulletAppState(); stateManager.attach(bulletAppState); String sinbadPath = "Models/Sinbad/SinbadOldAnim.j3o"; Node sinbad = (Node) assetManager.loadModel(sinbadPath); Node extender = new Node(); for (Spatial child : sinbad.getChildren()) { extender.attachChild(child); } sinbad.attachChild(extender); //Note: PhysicsRagdollControl is still a WIP, constructor will change KinematicRagdollControl ragdoll = new KinematicRagdollControl(0.5f); sinbad.addControl(ragdoll); stop(); } }
model.setLocalTranslation(4, 0, -7f); ragdoll = new KinematicRagdollControl(0.5f); model.addControl(ragdoll);
ragdoll = new KinematicRagdollControl(0.5f); setupSinbad(ragdoll); ragdoll.addCollisionListener(this);
@Override public Control cloneForSpatial(Spatial spatial) { KinematicRagdollControl control = new KinematicRagdollControl(preset, weightThreshold); control.setMode(mode); control.setRootMass(rootMass); control.setWeightThreshold(weightThreshold); control.setApplyPhysicsLocal(applyLocal); return control; }
@Override public Object jmeClone() { KinematicRagdollControl control = new KinematicRagdollControl(preset, weightThreshold); control.setMode(mode); control.setRootMass(rootMass); control.setWeightThreshold(weightThreshold); control.setApplyPhysicsLocal(applyLocal); control.spatial = this.spatial; return control; }
@Override public Object jmeClone() { KinematicRagdollControl control = new KinematicRagdollControl(preset, weightThreshold); control.setMode(mode); control.setRootMass(rootMass); control.setWeightThreshold(weightThreshold); control.setApplyPhysicsLocal(applyLocal); control.spatial = this.spatial; return control; }
/** * Create a shallow clone for the JME cloner. * * @return a new control (not null) */ @Override public Control cloneForSpatial(Spatial spatial) { KinematicRagdollControl control = new KinematicRagdollControl(preset, weightThreshold); control.setMode(mode); control.setRootMass(rootMass); control.setWeightThreshold(weightThreshold); control.setApplyPhysicsLocal(applyLocal); return control; }