So I'm trying to use SpriteKit to make the background of my game. The walls have alpha 1.0, and the safe area alpha 0 and fully transparent. (e.g. a big black square with a smaller transparent square in the middle of it). Yet sprite kit always assume the entire image is either fully opaque or fully transparent. That defies its purpose isn't it? Is there a way to make this work?
How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here
Why is SKPhysicsBody not picking up alpha?! SpriteKit for a WatchOS game.
Your application must fill the entire screen with content. Consider using a simple SKShapeNode to provide a black background behind your game’s main play area.
My content does fill the entire screen. I am also using SKShapeNode for the game's area and my level background that I need collision on. When using "alphaThreshold: 1.0," no collision happen. When removing the alphaThreshold, collision happen instantly, even in the hollowed/transparent area of my level background asset.
Some context: A rocket spawns on a base. The rocket moves within the transparent area of the background, and collides with its when hitting the opaque area of the background (walls)
Here is the test level background image I am using, a big white square, with a smaller hollow square in the middle of it: