public void standUpAnimation() { setAnimationFullBody("StandUpGround", 0.5f, LoopMode.DontLoop); animControl .getSpatial() .getParent() .setLocalTranslation(animControl.getSpatial().getWorldTranslation().add(0f, 0.1f, 0f)); animControl.getSpatial().setLocalTranslation(Vector3f.ZERO); }
@Override public void onAnimCycleDone(AnimControl ac, AnimChannel ac1, String string) { if (string.equals("StandUpGround")) { characterControl.setWalkDirection(Vector3f.ZERO); characterControl.setEnabled(true); headChannel.setAnim("IdleStanding", 0.5f); // Vector3f center = animControl.getSpatial().getWorldBound().getCenter(); animControl.getSpatial().setLocalTranslation(new Vector3f(0f, -1f, 0f)); // animControl.getSpatial().getParent().setLocalTranslation(animControl.getSpatial().getParent().getLocalTranslation().add(0f,0.1f,0f)); } }