SpriteKit SKPhysicsBody bodyWithTexture is Upside Down

后端 未结 3 1125
情话喂你
情话喂你 2020-12-16 21:41

Hi I\'m trying to fix this bug with spritekit\'s physics shape appearing upside down.

[SKPhysicsBody bodyWithTexture:monsterTexture size:monsterTexture.size]         


        
3条回答
  •  醉梦人生
    2020-12-16 22:29

    I think it is a bug in Spritekit on iOS8. My suspicion is that the bug occurs when the texture for the physicsbody is retrieved from the internal cache. It might be incorrectly flipping the image to try to correct co-ordinate systems from CoreGraphics.

    Use bodyWithBodies instead. Bummer, I really like this feature.

提交回复
热议问题