what i have now in test project, where i try to fix this problem:
2 polygon objects
2 actors, each of actor contain one polygon object
1 array with actors, i run through it in render method and with use of shapeRenderer draw polygons
1 OrthographicCamera
1 Stage
1 ScreenViewport
The logic is next: i create polygon 1 and polygon 2 with the same size and same position at 0,0 .
Than i do setPosition(Gdx.graphics.getWidth()/2, Gdx.graphics.getWidth()/2). Than i translate one polygon by 50 pixel on axis X and run setOrigin(Gdx.graphics.getWidth()/2, Gdx.graphics.getWidth()/2). And i added InputListener for first polygon, when i click on it i do rotateBy on second actor with second polygon. My camera has Y-Up. On rotation second polygon think that his origin point is top right corner of the screen and do rotation around it.
Here is and gif of result: http://i.imgur.com/CDzqTta.gif
And scheme how it behave: http://i.imgur.com/dCB0HDX.jpg
And here is gif of its behave if i maximize window: http://i.imgur.com/6ZKn33d.gif . Here we can see that after resize, green polygon do rotation around the point which was before resize top right cornern of the screen.
Here is a test project with this problem https://www.dropbox.com/s/ti2iiwm2cbom62f/polygonRotation.zip?dl=0
Could anyone help to find out where is a problem?
Thank you.
