0

I added a rope in my SpriteKit game and everything is ok. However, if I change the scene anchor point to (0.5, 0.5) every segment of the rope falls. If I leave it to (0, 0) everything is ok. Is there any method to make the rope work well even if I change the anchor point to (0.5, 0.5)? Thanks a lot!

Eduard
  • 620
  • 9
  • 21

1 Answers1

0

One thing that you could do that would fix the problem would be to just take the anchor location of your SKPhysicsJointPin and add self.size.width/2 to the X and self.size.height/2 to the Y. Essentially what you are doing is assuming that the self.anchorPoint is still equal to (0,0), even though its not. For some reason SKPhysicsJoints aren't the most versatile, but this should do the trick.

Lahav
  • 781
  • 10
  • 22