Projector frustrum, meshes and meshes bounds ?!

After playing with the projectors I come to this conclusion :

When the frustum of the projector is in the bounds of the mesh, even if the mesh is not intersecting with the frustum, the texture is projected on the mesh.

Here are 2 screenshots to show what I mean :

First, the projector frustum is outside the mesh bounds, and obviously, the mesh doesn’t intersect the frustum. The texture is not projected on the ground (it’s a mesh, not a Unity terrain). OK

Now, I placed the frustum of the projectors in the bounds of the mesh, the mesh still doesn’t intersect with the frustum but as you can see, the texture is projected on the ground.

It’s quite annoying, and I can assume that it is an expected behaviour, but is there any solution to avoid that ?

My problem is that in a complete scene, I puts many objects in a “walkable” layer and I need to project a texture on these objects, but in a case where for instance a wood bridge is above the ground, the projection is on both objects.

Thanks in advance.

Maybe use tags (or similar) instead of layers to determine “walkable” and then use the projectors “ignore layers” as intended for things you don’t want to project onto? Layers are really about the rendering, so would seem the logical place to manage projections.

Regs,
Mike
@runonthespot

I can’t use tags as you said.
Layers are also use for collisions, and all my objects in the “walkable” layer have to be in this layer (collison pathfinding).

Actually I try to understand how work the matrix of projection of the projector, ie. _Projector and _ProjectorClip in the shader, but without succes.

When testing layer membership for collision/pathfinding, can you not use a LayerMask and include both “walkable” and “walkable/projectable” ?

Mike
@runonthespot

(This post on answers, especially the second answer) provides details.
http://answers.unity3d.com/questions/8715/how-do-i-use-layermasks.html;jsessionid=A1CE67086C992CA613022CEA17BCF794