- Home /
increasing shadow distance for a single object?
I am working on a small flying simulator wich should run on browser aswell as on android devices. The main work and coding is done and now i am struggling on the performance settings. For Android the shadow distance is set to 20 units as default. For all non moving objects that is ok. But for the Gameplay it is mandatory to see the players shadow always on the ground (player has to land on a spot). If i increase the shadowdistance on the whole szene, the performance is really bad. So is there any possibility to increase the shadow distance just for one single object?
Have you tried lowering the shadow resolution?
You can control what lights and shadows effect using the culling mask on a light but this would require turning shadows off on everything but your aircraft if you wanted a large distance.
An alternative would be to fake the shadow using something like a projector.
Yes the shadow resolution is set to low. I think i will try to fake the shadow for far distances. I will try this out when I am at home ;) Thx for that idea.
I don't know, maybe it's not the shadows wich lowers the games framerate. I am really new to unity and I just found out a few $$anonymous$$utes ago that there is also a profiler. I hope this will help me to find out my bottlenecks
Answer by Oribow · Apr 17, 2015 at 02:56 PM
Try to simulate the shadow instead. Take a look at projectores: http://docs.unity3d.com/Manual/class-Projector.html