I get this crash message whenever I try to create a spatial and add the animation channel and control and the AnimListener
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
And Spatial is a superclass of Node and Geometry. Yours is a Node… and it has children.
I’m not sure how better to explain “open it in scene explorer” but here goes.
Make sure you have the SDK open.
Expand your project tree on the left. It’s the tree view that has projecty things in it and looks kind of like the tree view in windows file explorer. In IDEs, this is where it shows your project and stuff.
Find the assets folder under your project.
Expand the project assets folder by clicking on the little +/- button.
Expand the models folder by clicking on the little +/- button.
Do you see your model file in there?
In Windows, right clicking on an object will often open up a menu with additional options that one might perform on that object.
Right click on your model file.
There should be an “Edit in SceneComposer” option. Click that.
Your model hierarchy will be displayed in the lower left panel… it’s another tree-like view where you can click to expand the tree sections.
You can use this to figure out which child has your control.
Following the scene composer tree what you need is “Armature” as it is the one containing the control. To explain that in other word, the player you are loading is a node containing multiple child and one of these child contain the control you need, the child named “Armature” in you case.
So to get you control you need to to edit the line where you request the control as :
control = player.getChild("Armature").getControl(AnimControl.class);