question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Animation tutorial refers to the deprecated code that no longer works

See original GitHub issue

I’m using latest stable release of jmonkeyengine, specifically 3.5.2-stable. While reading latest documentation - https://wiki.jmonkeyengine.org/docs/3.4/tutorials/beginner/hello_animation.html I tried to run relevant sample code, but it turns out:

  1. All animation-related entities referred on that documentation page are deprecated.
  2. Moreover, relevant code no longer works. In particular related sample code referred on that page fails with NullPointerException after attempting to obtain AnimControl instance via control = player.getControl(AnimControl.class);.

Minimalistic example:

    @Override
    public void simpleInitApp() {
        viewPort.setBackgroundColor(ColorRGBA.LightGray);
        initKeys();
        DirectionalLight dl = new DirectionalLight();
        dl.setDirection(new Vector3f(-0.1f, -1f, -1).normalizeLocal());
        rootNode.addLight(dl);
        player = (Node) assetManager.loadModel("Models/Oto/Oto.mesh.xml");
        player.setLocalScale(0.5f);
        rootNode.attachChild(player);
        control = player.getControl(AnimControl.class);
        control.addListener(new TestAnimation());
        channel = control.createChannel();
        channel.setAnim("stand");
    }

Also I believe I referred all required libraries: jme3-core, jme3-desktop, jme3-lwjgl, jme3-testdata, jme3-plugins

All libraries imported from maven central, all of 3.5.2-stable version.

I’d like to suggest to (1) update documentation, (2) change engine code so that deprecated entities are handled in a distinct manner, e.g. by throwing UnsupportedOperationException or the like in the relevant places.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
stephengoldcommented, Jul 3, 2022

Thanks for getting in touch.

We’re aware that the Wiki is out-of-date and the code listed in the animation tutorial doesn’t work with recent versions of JMonkeyEngine.

The deprecated classes and methods still work in general. However, the structure of the 3-D model used in HelloAnimation changed as of JME version 3.3. That’s what causes the NullPointerException you encountered.

There’s an updated version of HelloAnimation.java available from GitHub, which should work for you: https://github.com/jMonkeyEngine/jmonkeyengine/blob/v3.5/jme3-examples/src/main/java/jme3test/helloworld/HelloAnimation.java

For JMonkeyEngine support, the place to go is our Discord forum: https://hub.jmonkeyengine.org/

0reactions
stevenbrightcommented, Jul 3, 2022

Makes sense, thank you for responding so quickly. Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Animation .animation deprecated - Forums - Hacking with Swift
So, objective is to just have an image rotating. Code I found informed me that . animation has been deprecated.
Read more >
How to use ActionScript with Animate - Adobe Support
(Deprecated with Animate) Script Assist mode lets you add ActionScript to your FLA file without writing the code yourself.
Read more >
Removed and deprecated - Python Video Tutorial - LinkedIn
Deprecation is defined as the discouragement of use of a library or package, because it's been superseded, or is no longer considered efficient...
Read more >
Animation Blending (Deprecated) | Learn PlayCanvas
This tutorial uses the deprecated Model and Animation components. Please refer to the Anim State Graph Blending tutorial instead.
Read more >
Tutorial deprecation FAQs - June 3rd 2021 - Unity Forum
Hi Learners! As you may know, the bulk of the content on the Learn platform is developed internally by Unity, but there are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found