- Home /
How to trigger an effect when an object is under a shadow?
Hi all.
I'm making a scene that demonstrates how a shadow over a river will reduce the water temperature, and result in a corresponding decrease in dissolved oxygen.
I was wondering if it is possible to trigger an effect that modifies a particle emitter when a region is under a shadow.
My current idea is to put a plane above the the particle system that is culled by the playercamera, raycast down onto the plane to detect the color of the shadow map, and when the shadow map gets so dark it will change the particle system.
There is a similar idea here using beast: http://answers.unity3d.com/questions/321849/how-to-get-pixel-color-using-raycast-on-object-wit.html
Has anyone tried this with Unity 5's realtime lighting?
Any other ideas that could accomplish the same effect?
Your answer
Follow this Question
Related Questions
How to trigger a particle effect? 1 Answer
How to hide wire after burn effect? 1 Answer
Spawn Particle Effect on Socket 0 Answers
Alpha Blended Partiles Flickering 1 Answer