In fps 1.1.3 i try to follow everything you say to do,The problem is the bullethole does not appear. all my objects are set up and tagged, i am however using a meshed terrain. Do i need to tag it diffrently? I hav no errors at all. Code (csharp): var maxDist: float = 1000000000; var decalhitWall : GameObject; var floatInFrontOfWall : float = 0.00001; function Update () { var hit : RaycastHit; if(Physics.Raycast(transform.position, transform.forward, hit, maxDist)) { if (decalhitWall hit.transform.tag == "Level Parts") Instantiate(decalhitWall, hit.point + (hit.normal * floatInFrontOfWall), Quaternion.LookRotation(hit.normal)); } Destroy(gameObject); }
Have there been a solution for this issue...? Because I have a similar problem about this part, My problem is that it seems at some distances (mostly close distances) the Raycast some how doesn't collide with the mesh and leaves its effect on the mesh behind the one it should. Like if there are two walls, it will go through the first one and collide with the one behind and create the bullet whole there!!!