HELP! Jump action in animation with Joint Controller

Hi everyone, I really need urgent help. I'm using joint controller to do the animation. The animation is executed by this method

protected void animOneShot(int frame1, int frame2) {
      jc.setTimes(frame1, frame2);
      oneShotLastFrame = frame2;
      currentAnimLoop = -1;

E.g. for jump animation from frame 1-10, i called animOneShot(1,10). I want to specify my own jump translation. I got 2 animation for jump, one with Y translation, and one without translation. My question is, if I use the jump animation with translation, is the node y position also translated? Can I let say jump to higher place?
For the jump animation without translation, what is the best way to simulate my own Y translation, given the animation that controlled by joint controller is one shot (not per frame)? Can anyone help with giving sample code? Thanks.

To be honest, I am having problems understanding exactly what it is you are asking…

Maybe just Node.setLocalTranslation( 0, yValue, 0 ) is what you are looking for?

what I'm asking is, how to make character jump motion in jME.  If I just set yvalue of node's local translation, then the node will suddenly moved to specified y coordinate. What I'm looking for is how to make the translation like a jumping movement. Any idea?

I would try to use a Controller.

In the controllers update Method you could either use model.getLocalTranslation.interpolate() if you know the target location or maybe only interpolate the y value.

Maybe with something like a sine function to make it look like a smooth jump.

Yup, thats how I would start too…


did you solved the problem ? can you post it here ?

I will face the same soon, sooo :slight_smile: