How would I go about editing the actual vertexes of a plane? For instance, I'm trying to implement fog-of-war in an RTS game. What I've decided to do after a considerable time spent researching is to make a plane above my units but below my main camera. Then, if a unit walked under it, set the vertices to alpha 0 by using a raycast up from the object to detect where the unit is. However, I don't know how to change the alpha of specific. How would I do that?
Thanks in advance, Elliot Bonneville.
P.S. Thanks for anwering all my many questions, everyone!
asked Mar 23 '10 at 11:48 PM
You would need to make use of the Mesh class, in particular Mesh.colors for vertex colors. Also you'd need a shader that actually uses vertex color of course. Most of the built-in ones don't, but the particle shaders do, and there are some on the wiki as well.
answered Mar 24 '10 at 12:02 AM