Hello,
I have this script that Instantiates a bullet hole when a raycast hits something. The problem is it Instantiates on wrong rotation, so it doesn’t actually look like a hole on the wall. Any help??
var hit : RaycastHit;
if (Physics.Raycast (transform.position, fwd, hit, attributes.Range))
{
print ("We hit something!");
Instantiate(Hole, hit.point, Quaternion.FromToRotation(Vector3.forward, hit.normal));
}