AnimClip vs AnimControl

when I download JME 3.2 about two years ago, I followed the beginners tutorial and it worked great and I learned alot. Thank you to everyone who built JME and the tutorial!
I installed the 3.3.0-beta1 version and see that some of the classes, in particular AnimControl, have been been deprecated.

  1. If AnimClip is the replacement are there any code examples showing how to use it?

  2. How do I install the 3.3.2-stable version? (the 3.3.0-beta1 used a self installing exe, the jME3.3.2-stable.zip from github has a jar file that when I run it gives me a test chooser that doesn’t do anything after the test chooser pops up)

  3. the following code worked under JME 3.2
    public void testmodels() {
    DirectionalLight dl = new DirectionalLight();
    dl.setDirection(new Vector3f(-0.1f, -1f, -1).normalizeLocal());
    rootNode.addLight(dl);
    // here I adapt the “oto” robot example from the tutorial
    Node oto = (Node)assetManager.loadModel(“Models/Oto/Oto.mesh.xml”);
    oto.scale(1.02f, 1.02f, 1.02f);
    oto.rotate(0.0f, -3.0f, 0.0f);
    oto.setLocalTranslation(16.0f, 0.0f, 40.0f);
    rootNode.attachChild(oto);
    control = oto.getControl(AnimControl.class);
    channel = control.createChannel();
    channel.setAnim(“Walk”);
    }
    but in 3.3.0-beta1 gives a null pointer exception at
    control = oto.getControl(AnimControl.class);
    I think because AnimControl is deprecated
    Am I correct?

  4. the 3.3.0-beta1 installation gave me the option of going back to the JME 3.2 settings making it work but now
    I can’t get back to the newer configuration with AnimClip
    How can I get my newer 3.3.0-beta installation to use the newer classes and packages including AnimClip?

Thank you very much for any help you can give.
…kfrancis

2 Likes

Welcome to our Forum. Here is a quick summary of the 3.2 -> 3.3 transition:

  • AnimClip replaced Animation
  • AnimComposer replaced AnimControl
  • AnimTrack replaced Track
  • Armature replaced Skeleton
  • Joint replaced Bone
  • SkinningControl replaced SkeletonControl

To answer your questions:

  1. Examples using the new animation system can be found in the “jme3test.model.anim” package:
    https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-examples/src/main/java/jme3test/model/anim
    and elsewhere in the jme3-examples project.

  2. The 3.3 SDK is still unfinished. My advice would be to use Intellij or else the 3.2.4 SDK with the Gradle plugin.

  3. The NPE is because the model in question was converted to the new animation system, so it has an AnimComposer instead of an AnimControl.

3 Likes

Has the trouble been resolved?