Replacing Oto with Ninja, how would I do this?

i know alot of forum mods hate when beginners ask questions that should be explained in the tutorials, but even after looking through them I can’t find what all I need to do to replace the Oto model with the Ninja.

This is from TestWalkingChar (main):

private void createCharacter() {

CapsuleCollisionShape capsule = new CapsuleCollisionShape(3f, 4f);

character = new CharacterControl(capsule, 0.01f);

model = (Node) assetManager.loadModel(“Models/Oto/Oto.mesh.xml”);



character.setPhysicsLocation(new Vector3f(-140, 15, -10));




When I replace the Oto stuff with Ninja’s, I get this:

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.IndexOutOfBoundsException: bitIndex < 0: -1

at java.util.BitSet.set(

at com.jme3.animation.AnimChannel.addBone(

at mygame.Main.setupAnimationController(

at mygame.Main.simpleInitApp(…

it looks like I have to change up the bone stuff, and I also don’t get what these lines at the bottom are for:

private void setupAnimationController() {

animationControl = model.getControl(AnimControl.class);


animationChannel = animationControl.createChannel();

shootingChannel = animationControl.createChannel();




maybe shootingchannel is what is called when you shoot the bomb in the test? i got rid of it because it made the project crash.

i dont know what else to say, any criticism will be helpful too

you also need to change the animation handling “stuff” it’s crashing because the bones being referenced and I imagine the animations dont match across the two models

I’m a beginner too. However i think that you have to master all the hello tutorials before trying to understand TestWalkingCharacter.

And i’m sure that you haven’t seen the doc page before asking because , for example, there is this simple tutorial that explain to you what are the lines about AnimationController.

This is an advice, not a critique :slight_smile: