- Home /
Question by
rukukuku · May 09 at 08:42 AM ·
raycastraycastingdistanceraycasthit2dgradient
How to control multiple gradients
Hello, I want to show distance from wall with gradient. For 360-degree pictures, I cast rays every one degree and determine the distance from the wall if it is within certain ranges. I am currently using Debug.DrawLine
, but I would like to make a gradient. The further the player is from the wall, the weaker it is.
The left image shows what I have now. Keep in mind that you won't be able to see the Debug.DrawLine
in game. On the right (made in photoshop) is roughly what I want to achieve. How can I make this happen? Do you have any ideas, suggestions, or something I can do differently to make this better?
example.png
(334.2 kB)
Comment