- Home /
How to achieve the shadow effect in the figure?
Answer by Klarzahs · Jan 10, 2019 at 09:51 AM
Hi,
this can be done with raycasting and creating shadows from the result.
This page explains it quite well. If you want to have the pixelated effect, you will probably have to scale the object's shadow sprite into the shadow direction
thanks, I want a pixelated effect, you mean sprite pixelation or other?
Answer by zapextreme · Jan 10, 2019 at 02:43 PM
I found this GitHub repository. https://github.com/f15gdsy/2D-Light-of-Sight-Unity I think you can downscale the "light" to get the pixelate effect.
Answer by surfuay · Jan 11, 2019 at 03:26 AM
if you don't want anything robust, I believe you can just add a component in the editor
on the object you want in the editor and in the inspector click "Add Component"
type shadow
then you can set the "intensity" of the shadow with the 2 digits available for adjustment. I like to set mine at 5 and -5, seems to give just enough to show a shadow but not so much as its a loooooooong one.
Your answer
Follow this Question
Related Questions
Unity Mesh Based Shadows Overlap Issue 0 Answers
Fade-In/Out shadows for a specific object 0 Answers
unity shadows very dark 1 Answer
disabling shadow casting with SSE 0 Answers
Unity 2D Shader Graph Sprite transparent when in shadow 0 Answers