Controlling animation from 3ds file

Hi again!

This time I decided it would be neat to load animated 3ds file into my lil jme project, made simple bouncing ball in 3ds, exported it and imported into the engine. After loading object it is played only once, I have tried controlling the animation with code I found on those boards:


JointController char_controller;
char_controller = (JointController) myNode.getChild(0).getController(0);
char_controller.setTimes(1, 15);
char_controller.setRepeatType(JointController.RT_WRAP);
char_controller.setActive(true);
char_controller.setSpeed(.8f);


And received fallowing error:


2008-10-18 18:55:11 class praca.Main start()
SEVERE: Exception in game loop
java.lang.ClassCastException: com.jme.animation.SpatialTransformer cannot be cast to com.jmex.model.animation.JointController


Any tips what am I doing wrong?
Thanks!
Morq said:


java.lang.ClassCastException: com.jme.animation.SpatialTransformer cannot be cast to com.jmex.model.animation.JointController

Any tips what am I doing wrong?

It's all in the error message: you should not cast a SpatialTransformer to JointController, since they are different classes.
Do you know what a class cast is? If yes, you should know what to do now. If not, you absolutely need a few basic java tutorials before going any further with jME.

Okay thanks, you're right of course. It's just that I feel lost in jme all the time  >.>

Oh well anyway, I solved the problem, however I wonder now. Some guy on those boards was using JointController for *.3ds  files, I have to use SpatialTransformer, why it works like that? I mean shouldn't files of same extension use same controllers? :o