I have a character which moving on the scene and there is a layer on scene like screenshot at below. I want to change anchor of the layer with character’s position and rotate the layer according to new anchor point. At first interaction I can change anchor point and rotate layer but at second action I set layer anchor point to 0,0 for calculate new point but layer position change if I set anchor point to 0,0. Why layer position change when its rotating?
Initial Position. Layer (0,0) and size (500,500). Character position is (500,500)
Move the character and set new anchor point(Everything is fine)
RotateBy -20 degree(everything is fine)
Move Character to new position
Set anchor point to (0,0) and layer position reset to (0,0). The problem is this.
And after RotateBy -20 degree change position again.