# How to prevent a duplicated shadow?

It's a blob shadow which is built in Unity's standard asset package.

As you see in the figure below, a shadow that is created by the Unity Projector is duplicated at the floor below.

How can I prevent this duplicated shadow?

YES, you can try with a ray in direction of the shadow that get the altitude or distance and set the maximum shadow projector distance similar to ray result dynamically using physics ray.

For example:

Ray ray = new Ray(hit.transform.position, -Vector3.up);


Or you can use Unity shadow only for that particular object.

• thanks! but.. i'm afraid to raycasting on each update cycle. – mjk6026 Aug 30 '16 at 10:20
• @mjk6026 Did you try? I don't think it would be that much of a performance-killer, even when you have thousands of objects doing it. But humans are notoriously bad at estimating performance impacts. So testing and profiling it is the only way to tell for sure. – Philipp Aug 30 '16 at 14:07
• @mjk6026 Profiling is cool, try it. – S. Tarık Çetin Sep 1 '16 at 6:50
• thanks Soaring. i check it and i know it's have a pretty small time. thanks! – mjk6026 Sep 3 '16 at 15:42