My object interact with mouse. so its little difficult to track rotation by my self.
This works. Thank you .
This works. Thank you .
Code Select
public SimpleVector deriveAngles(Matrix mat) {
SimpleVector s=new SimpleVector();
float[] m=mat.getDump();
s.x=(float) Math.atan(m[9]/m[10]);
s.y=(float) Math.asin(-m[2]);
s.z=(float) Math.atan(m[4]/m[0]);
return s;
}