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?
SKLightNodeを作成するときcategoryBitMaskは、物理ボディの場合と同じように設定します。
SKSpriteNodeには、lightingBitMaskこのスプライトがライト ノードによって照らされているかどうかを決定するために設定できるプロパティがあります。
shadowCastBitMaskSKSpriteNode には、やなどの SKLightNode に関する追加のプロパティがshadowedBitMaskあり、スプライトが影を落として影の中に隠されていることを処理します。
ただし、SKLightNode には現在確認済みのバグがあることに注意してください。詳細については、この SOの質問を参照してください。