- Home /
Why the light passes through the mesh, how to make the polygons that refract light
Answer by Memige · Oct 26, 2012 at 09:58 PM
Unity materials have a variety of built in properties that you can alter to get different effects. For example, to make something partially trasparent (see-through), something like
gameObject.renderer.material.SetColor("_Color", new Color(1.0f, 1.0f, 1.0f, 0.7f));
should do the trick.
For other properties just replace `"_Color"` with `"_SpecColor"`, `"_Emission"`, or `"_ReflectColor"`
Keep in mind that all of these will only affect what the object itself looks like. If you are wanting the light itself to dynamically refract that's a little more involved
If none of this is what you were looking for, feel free to give more details so I can refine my answer.
Answer by zverb · Oct 27, 2012 at 08:25 AM
In the first case, the wall does not break a highlight on the floor from a point of light in the second wall will not stop the light and he lands on another wall, how to make sure to highlight the floor refracted by the red line (as it should check). And the light does not penetrate through objects
Your answer
![](https://koobas.hobune.stream/wayback/20220613082925im_/https://answers.unity.com/themes/thub/images/avi.jpg)