Wondering if anyone can help, started creating a IDE using LibGDX and want to create a Actor that has zooming identical to Spines, zoom to cursor / zoom away from cursor. Was wondering if anyone would be able to shed light on the algo used, Ive done the usual googling and the current algo's I've seen aren't quite right.
So far I'm using the following in the draw method, where mousePos.x,y is coords relevant to the centre of container and pointer ...
Matrix4 transformMatrix = camera.combined.cpy();
transformMatrix.translate(-mousePos.x, mousePos.y, -1);
transformMatrix.scale(scale, scale, scale);
transformMatrix.translate(mousePos.x, -mousePos.y, 0);
Any help greatly appreciated.....