In my game I want the player to be able to highlight an area on the floor.
When he clicks and holds the mouse while moving it, I want to hightlight that area he is “painting”.
For example to show where something would be built.
Something like this:
Unfortunately I have no clue how to achieve that, as I have basically no experience with materials.
Or do I even need a material?
the simplest highlight is just a two sided additive material with a solid color. though your pic looks more like a one sided opaque material on a mesh that has the normal facing inwards(or a normal cube that has the reverse culling checkbox selected).
Thanks for the hint with the two sided additive material. But how can I define the rectangle to use, or in other words, how do I define the bounds where this material should be applied? An on to what should it be applied?
I was thinking you could use a cube with that two sided additive material and just scale it to whatever dimensions you need. So the area the material is applied is just the cube itself.
I may not understand what you’re trying to do though.
Ok, that looks very promising, thanks. There is one catch, however: I want that only the floor receivces that decal. Now I can set decals for all other objects in my game to False, but then they would receive no decals at all.
Is there a way to achieve this maybe via the material?