- Home /
is there a way to preventing 2D light from passing through sprites, if the light is behind vs front sprite ?
if you have a simple rock sprite in your 2d scene. and lets say, the player has a light source goes in front and behind this rock, even though you can't see the player when they are behind the rock sprite, the light is still showing. is there a way to prevent this from happening in 2d scene?
Answer by Daviiid · Feb 17, 2021 at 02:05 PM
you mean like cast a shadow?
I believe you can use shadow caster for that, I think. no not shadow, just simply prevent light from being seen, whenever the light source is hidden behind sprite.
-For example, If u add a sprite/image to your 2D scene and add a 2D light and make the light circle around that sprite, the light should disappear or not be visible whenever its behind the sprite/image but appear/visible whenever in front. How can I achieve this?
Your answer
Follow this Question
Related Questions
Normal map on 2D sprite screwed it up.,Applying material with normal map on 2D sprite screwed it up. 2 Answers
How to sync animation if animation should be use with specially object 0 Answers
How to destroy a object when it's off screen and re-instantiate it when it gets back on screen 0 Answers
How to crop sprite during runtime? 2 Answers