I have quite simple script that allows me to change mesh vertices colors to black. But I need to have a script that would change vertex color under player as he goes.
I wanted to ask what would be best approach for this that is also not too performance heavy as the mesh that player is using as a ground can have thousands of vertices.
The outcome I am going for is having mesh with whatever vertex colors and as player moves he would change those vertices to black.
Thank you! The raycast method is great for what I need.
Although I have a problem with instancing. Is it possible to make mesh modifications only on one instance? Basically if I have a function that changes vertex color on that mesh it rewrites that mesh basically. So if use fe. 10x10m square plane modularly and build level from those, it changes the vertex color on all of them rather than only on the one that player is currently on.