I can’t see somewhat abnormal in your class. If your class don’t is working, then :
-your models aren’t in right package or;
-Your eclipse has a bug.
Make sure your oto.mesh.xml is at package : “assets/Models/Oto” and your MonkeyHead.mesh.xml is at package :
“assets/Models/MonkeyHead” in your project.
Could you copy-paste the code and run it, please.
Here is an exception I got:
[java]
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at com.jme3.animation.AnimControl.resetToBind(AnimControl.java:304)
at com.jme3.animation.AnimControl.reset(AnimControl.java:293)
at com.jme3.animation.AnimControl.(AnimControl.java:122)
at com.jme3.scene.plugins.ogre.MeshLoader.compileModel(MeshLoader.java:712)
at com.jme3.scene.plugins.ogre.MeshLoader.load(MeshLoader.java:758)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:233)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:355)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:365)
at MyAnimationTest.simpleInitApp(MyAnimationTest.java:13)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:187)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:134)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:183)
at java.lang.Thread.run(Unknown Source)
[/java]
Guy, I can’t somewhat related with animation in your source code, however, the exception mean null pointer exception of
Animation Control. It’s like your project don’t wanna build. make sure your project already was cleaned and built in “clean and build”. make sure too you already installed the “OgreXml support” plugin and “OgreXml tools” plugin
via "Tools - Plugins - Available Plugins.
Hello
exception mean null pointer exception of Animation Control
But there is no exception when I swap 12th and 13th lines. Anyway, if you didn't get any error, it is only in my case.
Sorry if i did something wrong.
Show me your project tree so i can see what is wrong.
Make sure your project folder and subfolders are opened before you take a print screen and upload.
Returning to the issue of Mesh Animation, when you to set the channel’s animation with : channel.setAnim(“stand”);
make sure your Mesh’s Animation’s Name is “stand” too, before the exportation.
It is a bug in jME3. Thanks for the test case, I will check it.
Fixed in SVN.
Thanks a lot.