Rotating properly via SpatialTransformer

Well, my goal is to rotate a node by 90 degrees around the Y axis(but not instantly). But I can't seem to do it properly.

Here's the source:


public class RotateAction extends KeyInputAction {
   private Node p;
   private Quaternion nodeQ;
   private Quaternion nodeRotation;
   private SpatialTransformer nodeRotator;

im not really sure what u mean by u cant move forward after that.



if u mean move ur node forward, u need to change the node's localtranslation.

but spatialtransformer changes the node's worldtranslation to do the animation. this might cause problem sometimes.



i tried to use spatialtransformer to rotate my terrain model and then move my player on the terrain while the terrain is moving. but the way spatialtransformer works doent allow me to do that. so u might wanna look into that as well.



can u give me a more detailed description about what u r trying to do here? or maybe a working code would help too~


if u mean move ur node forward, u need to change the node's localtranslation.

Yeah, I'm using jME's KeyNodeForwardAction for that.

 [...]   public void performAction(InputActionEvent evt) {
        Vector3f loc = node.getLocalTranslation();
        loc.addLocal(node.getLocalRotation().getRotationColumn(2, tempVa)
                .multLocal(speed * evt.getTime()));
        node.setLocalTranslation(loc);
    }



It works just fine until my first rotation. After that nothing happens.

but spatialtransformer changes the node's worldtranslation to do the animation. this might cause problem sometimes.

I guess that's the problem.
I'll try something different, then. Thanks for the help.