Overlay help needed... again

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

OOf, I don’t know this one. Typically the chains are already attached to the bag

@Dara.Amarie Can you help??

1 Like

I think I’m gonna try rotating it a teeny bit to begin with, because I think the problem is happening when the punching bag starts rotating.

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.

1 Like

Okay, thanks so much @Lin.Steeles and @Farah_DeSantis
The problem actually was with the anchor point, and now it’s all fixed!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.