Alright, So I got this code where I punch in these values:
rot :1.0416666 0.0 -0.0
pos :-71.25 67.5 91.875
And get these values back:
rotPos :-71.25 67.500015 91.874985
Now I’m clearly trying to rotate a Vector3f by another Vector3f, but the following code isn’t rotating anything. Can someone tell me what I’m doing wrong?
public Vector3f rotV3fByV3f(Vector3f npos, Vector3f nrot){
Vector3f pos = new Vector3f(0,0,0);
Vector3f rot = new Vector3f(0,0,0);
Matrix4f matrix = new Matrix4f();
matrix.setIdentity();
pos = new Vector3f(npos);
matrix.m03 = pos.x;
matrix.m13 = pos.y;
matrix.m23 = pos.z;
rot = new Vector3f(nrot);
Matrix4f.rotate((float) Math.toRadians(360), rot, matrix, matrix);
return new Vector3f(matrix.m03, matrix.m13, matrix.m23);
}