This has bugged me for months now and I am at a dead end. I am trying to take the Blender camera’s quaternion and import it into JME, making the java ingame camera face the same way.
First off, is there anyone who’s simply done this before and can help? I have been reluctant for a long time to post about this as there are multiple threads with solutions, none of which seem to work for me, importing the .blend directly also will not work so currently I’m working by simply typing values from blender into netbeans.
So I have been using
quat.fromAngles(FastMath.DEG_TO_RAD*-90, 0, FastMath.DEG_TO_RAD*180);
To correct for this.
As for the axis, I think the blender -jme difference is
x = x
y = z;
z = -y
Despite this I cannot solve it. I have been using Euler angles until recently, working with YZX in blender as JME uses that order, but no matter how I swap X Y and Z values to account for the difference I can’t make it work.
I’ve also tried quats, but to be honest recently I’ve been using trial and error since I know so little about them and if simply swapping values will work for the difference in axis.
This is what has popped up most on the forum to convert the Blender → JME quat, but for me there is no luck, with or without multiplying by my correction quat (I’ve tried multiplying 1 by the other and vice-versa)
new Quaternion(-rot3.getZ(), rot3.getW(), rot3.getX(), -rot3.getY()));
Like I said I’ve been reluctant to ask but can’t achieve something I thought would be simple and I cant carry on without this, so any help would be MUCH appreciated