I’m trying to do a punching bag swinging on it’s chain, but for some reason, when they rotate, the punching bag teleports down to the bottom of the screen and the chain attached to it teleports into the second one a little, but then they shift to the place I’m telling it to go. What am I doing wrong??
The overlays’ starting co-ordinates for the overlays are:
Punching Bag - 0.532 45 22 in zone 2 at layer 2
First Chain - 0.496 79 453 in zone 2 at layer 3
Second Chain - 0.496 79 485 in zone 2 at layer 4
Third Chain - 0.496 79 541 in zone 2 at layer 5
I haven’t read the code in detail but have you accounted for the fact that when you change the anchor point you have to change the spot positioning too?
e.g. If you have a 100 x 100 overlay positioned at spot 0 0, changing the anchor point to 0.5 0.5 will also shift the overlay by 50 50 px. So you will need to shift it back by 50 50 in the code to account for this.
not seeing the code you have above this line I can only assume that you haven’t changed the anchor point BEFORE you have set the spot it should shift to.