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?

enter image description here


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.

  • \$\begingroup\$ thanks! but.. i'm afraid to raycasting on each update cycle. \$\endgroup\$ – mjk6026 Aug 30 '16 at 10:20
  • 1
    \$\begingroup\$ @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. \$\endgroup\$ – Philipp Aug 30 '16 at 14:07
  • \$\begingroup\$ @mjk6026 Profiling is cool, try it. \$\endgroup\$ – S. Tarık Çetin Sep 1 '16 at 6:50
  • \$\begingroup\$ thanks Soaring. i check it and i know it's have a pretty small time. thanks! \$\endgroup\$ – mjk6026 Sep 3 '16 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.