Object gets stretched out when parented to terrain

Hello! I am making arrows stick into the ground when the hit the ground

But when i parent the arrows to the ground. They stretch out. I have no clue why

Is your terrain scaled nonuniformly (1, 1, 2 or something like that) ?

If so then reapply the scaling to the arrows after parenting them.

void class Arrow : MonoBehaviour
{
  private Vector3 defaultScale;

  void Start()
  {
    defaultScale = transform.localScale;
  }

  public void ParentArrow(Transform terainTransform)
  {
    transform.SetParent(terainTransform);
    transform.localScale = defaultScale;
  }
}

If your Terrain has a completely different scaling than your arrows, like way bigger or smaller, then you might need to multiply your defaultScale accordingly. (do this already in Start() where you get this value, for a little speed).