I need to scale a model instance (a 1x1x1 qube) in the y axis and then rotate it around the z axis. So basically it should look like a beam that is rotating in the middle. Unfortunately what ever I do, rotation is always executed before scaling and the result is a dear shape. what I get and what I want
instance.transform.setToScaling(JUMP_GATE_SIZE, JUMP_GATE_SIZE * 5, JUMP_GATE_HIGHT);
instance.transform.setTranslation(x, y, 0);
rotationMatrix.setToRotation(zVector, r);
instance.transform.rotate(rotation);
Any idea how to do that? I am trying to scale the cube to bride between 2 locations in space.