My question is how to detect if any of sprites in the scene is affected by light node.
Didn`t found anything related to this issue. Is there some delegate method like didBeginContact for SKLightNode?
My question is how to detect if any of sprites in the scene is affected by light node.
Didn`t found anything related to this issue. Is there some delegate method like didBeginContact for SKLightNode?
When you create a SKLightNode you set its
categoryBitMaskjust as you would with physics bodies.SKSpriteNode has a
lightingBitMaskproperty which you can set to determine whether this sprite is lit by a light node or not.SKSpriteNode has additional properties regarding SKLightNode such as
shadowCastBitMaskandshadowedBitMaskwhich deal with the sprite casting a shadow and being hidden inside a shadow.Be aware though that the SKLightNode currently has a confirmed bug. Look at this SO question for more information.