Joyful Games – iPhone game development with Apple’s Swift new language

Email Contact

Play SnakeJoy! The most addicting fun snake game on the internet

Play SnakeJoy in Your Browser!

Upside Down SKPhysicsBody when Loaded From Texture

I ran into an odd SpriteKit bug the other day when preloading and caching my texture atlases. It seems that you cannot create more than one SKPhysicsBody from a single instance of a texture, or all subsequent physics bodies will be created upside down. This StackOverflow thread suggests it’s an issue with internally cached textures.

Building an SKPhysicsBody from a cached texture creates inverted physics bodies

Building an SKPhysicsBody from a cached texture creates inverted physics bodies

(more…)