With the following Code i move a object along the x axis, and rotate it relative to its position every frame.
quad.getModel().setIdentity();
quad.getModel().scale(new Vector3f(10, 10, 10));
quad.getModel().translate(new Vector3f(x, 0, 0));
quad.getModel().rotate(x * 2, new Vector3f(0, 1f, 0f));
Now i want to remove the model.setIdentity()
. How i can achieve the same thing now?