Bullet holes disappear when moving about FPS

Hi Guys!!

I have a FPS game that I’m building and my guns shoot with racasts, but when a bullet hole is instantiated it pops in and out( if that makes sense ), when I’m moving around in the 3D world. It’s almost like the bullet hole texture is just underneath the surface it’s instantiated on.

I know I should try to instantiate the bullet hole just a bit more above the surface, but I have no idea how.

Can anyone help?

Thanx!!!

if (Physics.Raycast(ray, out hit, 50f) && hit.collider.tag != "Bullet" && hit.collider.tag != "Default")
                {
                    GameObject bulletHoleClone = Instantiate(bulletHole[0], hit.point, Quaternion.FromToRotation(Vector3.up, hit.normal)) as     GameObject;
                    bulletHoleClone.transform.parent = hit.transform;
                }

sounds like “z fighting”, the textures are in the exact same position and the renders flicks between the two.

Try

hit.point + (hit.normal * 0.01f)

for the position

1 Like

Absolutely perfect!! Thanx!! and thanx for the quick reply as well!!!