still working on the terrain tutorial [http://forum.unity3d.com/viewtopic.php?t=16941] I have tried the “Character-Shadow-script” from the wiki in order to avoid using real time shadows [as they burn my computer and I would like to stick to a fully lightmapped terrain] but to get a nice and dynamic player shadow.
I like this script pretty much although attaching it to my original directional light did not work for me: On the backsinde of e.g. hills [seen from the directional light’s position] it produced very weird shadows even pointing to a complete wrong direction. So I assigned the script to a game object that follows the player (but doesn’t) rotate [fig. 1: the white cube].
This works pretty well in most cases but sometimes leads to strange shadows as well as you can see in fig. 2 and fig.3: The walls shouldn’t be affected by the projected shadow as the light is coming straight from the right hand side [fig. 2] and from the upper right corner [fig. 3].
Is there any possibilty to fix this? Or is this a “built in” limitation of the technique of the Character-Shadow-script?
I thought maybe changing the near clip plane of the projector would help but is does not seem to have any effect. See image attached: The magenta rectangle marks the near clip plane…
i used the shadow script and i like it too … but have a problem with the lightmap shadows that i already had on the scene … when the player walk on the building shadows , its shadow is still appear and that dosn’t give a reality look … did anyone have an idea to fix this problem ??
Hanankk: Is there a way for you to change the color of the realtime shadow? Because if you can, you could make the shadow have a lighter color to match your baked shadows.
Lars: Is there a way you could post your finished shadow script? I’d LOVE to try it out!
Edit: Never mind. Just noticed that it’s for Unity Pro only.