title: Unity disable child rotation
body: <p>I have one issue in unity 2d with my object , when i shoot the arrow to the box collider to the other element , and when it hit and go into child i mean arrow become child of parent (BOX) the child start to rotate to the left and to the right .. I really want to disable left and right rotation of the child .. the box (parent) still need to rotate as same as it was before.. i have code like this and my arrow in rigidbody2d is on kinematic mode...</p>
  
  <p>this is script of the arrow .. </p>
  
  <pre><code>{
      public float flySpeed = 20f;
      private Rigidbody2D arrowBody;
      private bool shouldFly;
  
  
      // Start is called before the first frame update
      void Start()
      {
          shouldFly = true;
          arrowBody = GetComponent&lt;Rigidbody2D&gt;();
      }
  
      // Update is called once per frame
      void Update()
      {
          if (shouldFly == true)
          {
              //make our pin fly
              arrowBody.MovePosition(arrowBody.position + Vector2.up * flySpeed * Time.deltaTime);
          }
      }
  
      private void OnTriggerEnter2D(Collider2D collision)
      {
          if(collision.tag == "target")
          {
  
              shouldFly = false;
              transform.SetParent(collision.gameObject.transform);
  
  
          } else if(collision.tag == "arrow")
          {
  
              SceneManager.LoadScene("quickGameOverScene");
          }
      }
  }
  </code></pre>