Bullet decal gets bigger on a bigger object

So I have this problem here the decal keeps on getting bigger with the object. it says connected by a parent to the decal. I think I might know the reason why but I don’t know how to do it.

Instantiate(bulletholeTransform, hitInfo.point, hitRotation, bulletholeTransform.parent = hitInfo.transform);

Im guessing that is the “hitinfo.transform” which needs to be something like hitinfo position and rotation but not scale

any help would be appreciated :slight_smile:

I think your issue is when you parent the bullethole to the other object it is scaled based on the new parent’s scale.

Check the Documentation for Transform.SetParent(). The second parameter ‘worldPositionStays’ will scale the object relative to the parent to keep it’s same position, rotation, and scale as before being parented.

So something like this should work for you.

// Instantiate the prefab at the correct position / rotation
var bullethole = Instantiate(bulletholeTransform, hitInfo.point, hitRotation);
// Set the bullethole's parent and adjust it relative to the parent.
bullethole.transform.SetParent(hitInfo.transform, true);