2

I have never gotten the upper/lower angle limits to work properly on SKPhysicsJointPin objects, and I think I've finally figured out why: if the lowerAngleLimit is set to a negative value, it breaks every time. It only works correctly with positive values.

For example, say I set this 90º pin:

    pin.lowerAngleLimit = -PI/2;
    pin.upperAngleLimit = 0;

Now I'll make the sprite rotate slowly towards that lower limit. The instant it hits -90º it will suddenly zoom the sprite the long way around back to 0º. It will never pin at -90º. It doesn't matter what negative value I try, -1.0 does the exact same thing. It appears to be a bug in SpriteKit. Has anyone else gotten this to work, or found an workaround?

BGreenstone
  • 260
  • 1
  • 11
  • Did you every figure this out? I am seeing similar and figure its a misunderstanding on what it is supposed to be doing. – vagrant Aug 30 '15 at 02:51
  • No, I never did. It simply doesn't work correctly as is the case with much of Apple's gaming API's on iOS. – BGreenstone Aug 30 '15 at 13:24

0 Answers0