Skip to content
Snippets Groups Projects
Commit e20f5d58 authored by Adam Elfawal's avatar Adam Elfawal
Browse files

Account for renderer in parent as the assetpack is set up that way

parent d012913d
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,10 @@ private void CameraDither()
foreach (RaycastHit hit in rayhits)
{
Dithering dither = hit.collider.gameObject.GetComponent<Dithering>();
if(dither == null)
{
dither = hit.collider.gameObject.GetComponentInParent<Dithering>();
}
if (dither != null)
{
dither.SetOpacity(hit.distance, maxDistance);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment