Animation tutorial refers to the deprecated code that no longer works
See original GitHub issueI’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:
- All animation-related entities referred on that documentation page are deprecated.
- 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:
- Created a year ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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/
Makes sense, thank you for responding so quickly. Closing.