Hello! I am making a FPS and have a sphere collider on some prefabs placed on the floor. When i shoot my gun at the collider, my bullet hole appears on the collider instead of going through it. The colliders are set to ‘Is Trigger’ and are used so that i can pick up the weapon when i am inside the (sphere) collider.
Any help appreciated
Here is some code responsible fore the bullet holes:
if (Physics.Raycast(shootPoint.position, shootDirection, out hit, range))
{
GameObject hitParticleEffect = Instantiate(hitParticles, hit.point, Quaternion.FromToRotation(Vector3.up, hit.normal));
//hitParticleEffect.transform.SetParent(hit.transform);
GameObject bulletHole = Instantiate(bulletImpact, hit.point, Quaternion.FromToRotation(Vector3.forward, hit.normal));
bulletHole.transform.SetParent(hit.transform);