ShadowedBitMask vs. shadowCastBitMask

I don't understand the difference between shadowedBitMask and shadowCastBitMask in SKSpriteNode spritekit in objective-c for ios development.

in the documentation that says:

shadowedBitMask is defined as "To determine whether this sprite affects the shadow generated by light, its shadowCastBitMask property is checked for the categoryBitMask property of lights, performing the logical operation I. If the comparison results in a non-zero value, then the sprite is drawn using the shadow effect."

The default value is 0x00000000 (all bits are cleared).

shadowCastBitMask = "To determine whether this sprite blocks light (casts a shadow), the sprites shadowedBitMask property is checked for the categoryBitMask property of lights, performing the logical operation I. If the result of the comparison is a non-zero value, the sprite casts a shadow past itself."

Can someone want to rephrase or give me an example because I don’t understand what shadowedBitMask does?

+4
source share
1 answer

shadowCastBitMask will set if light creates a shadow with this object.

shadowedBitMask will set whether the object will receive shadow from the objects that selected it.

Do not forget that the light must be higher in zPosition in order to cast a shadow on another element.

+4

All Articles