I want to make a rotatable map. I tried to use Pin Object To Another example, but the child object position is changed when it’s running. Here is the position on the editor
but when I run it, the result is:
Is it possible to make the position of child does not change when it’s running?
I think the problem will be that the origin is at the centre of the original object, at specific co-ordinates. When you resize, the isn’t at the centre any longer. And the “Put child around parent” uses the centre of the object, whereas the angle calculation uses the origin.
In the event action that sets the AngleToParent, use child.X(“Center”), child.Y(“Center”), parent.X(“Center”) and, parent.Y(“Center”). This should solve your issue.
Ah, my bad. Undo those “Center” positions. Can you check that the origin is at the centre of the sprite (click on edit points when you double click the object in the editor)?