hell I use lwjgl with jom and tryed to make to rotate my object in it’s local y axes but insted of rotation it’s start to fly around the local axes.
can anyone help?
code is here:
Vector3f rotation = gameItem.getRotation();
modelViewMatrix.identity().translate(gameItem.getPosition()).
rotateLocalX((float)Math.toRadians(-rotation.x)/2).
rotateLocalY((float)Math.toRadians(-rotation.y)/2).
rotateLocalZ((float)Math.toRadians(-rotation.z)/2).scale(gameItem.getScale());
Matrix4f viewCurr = new Matrix4f(viewMatrix);
return viewCurr.mul(modelViewMatrix);