I need to add a bullet decal where my ray-cast hits the ground. My question is not about how to do that but how to make it look right. Currently when the decal appears it “flashes” as the player moves as it directly perpendicular to the floors normal. I think I may have made the decal object wrong. I simple made a small plane, added the texture to a transparent shader material and then instantiated the plane on the floor when a hit was found. I can get around this by translating the decal in the direction of the normal a little but surely there is a better way?
I believe it’s called “z fighting”.
As far as I know, moving it a bit in the direction of the normal is the most practical way to stop it from happening. I have always done it that way.