Hi
Another angle issue. Angle user issue actually :roll:
I use the following code to get the direction faced by a node:
node.getWorldRotation().getRotationColumn(0)
This will return "1, 0, 0" on a newly created node. This direction is used to apply a force in the direction the node is facing (i.e. aircraft engine, etc.).
Now what makes me uncomfortable is when the same node is controller by a MouselookNodeHandler. Up/down is not made along the X axis as I want it to, but along Z axis. Weird, the direction says I'm however along X axis :(
That's a snippet showing my concern:
public class Rota extends SimpleGame {
public static void main(String[] args) {
new Rota().start();
}
Node n;
@Override
protected void simpleInitGame() {
n = new Node();
Box b = new Box("b", new Vector3f(0, 0, 0), 0.5F, .5f, .5f);
n.attachChild(b);
rootNode.attachChild(n);
input = new MouselookNodeHandler(n, 50, 1);
}
@Override
protected void simpleUpdate() {
super.simpleUpdate();
System.out.println(n.getLocalRotation().getRotationColumn(0));
}
}
So, I'd love to think my way to get a direction is mistaken, but, hmm, of what i've seen on the forum, it's not that bad... :(
Any clues I could use to understand why there's like a 90