- Home /
Project a mesh on ground
Hello!
I'm trying to create a commandos type field of view projection for a project that I'm working on (see picture for reference). With help from another unity user on some forum that I can't find right now I was able to generate a mesh from a set of raycasts defining the vertices. Whilst this works great generally the problem is that it doesn't work on slopes. The way commandos seems to do it is projection on the ground which can then deal with slopes of various kinds.
I've tried using unity projectors and whilst that gets me halfway, I'm not able to add any kind of occlusion. I.E I'm not able to not project on surfaces not visible to the enemy. With my mesh I'm able to add that feature but the mesh hovers in the air and isn't visible on slopes as in the picture.
So my question is, given a mesh, how do I project a representation of that mesh on all surfaces directly below it. I've tried using shadows, but I would need two different lights, one directly above the mesh and the other as the general light. This doesn't work though since one light increases the ambient lighting of all objects and the shadows aren't visible for the other.
Could I maybe somehow define the mesh as a light of some sort?
Your answer
Follow this Question
Related Questions
Realtime point light + transparent shadow problem? 0 Answers
Progressive Lightmaps Troubles, shadows/lights bleeding. 0 Answers
Batching projector shadows 2 Answers
Rendering lights and shadows in AR Vuforia 0 Answers
Why my 2D shadows have low resolution? 0 Answers