Search Unity

Keep child transform to parent transform through scripting

Discussion in 'Physics' started by Deleted User, Aug 19, 2019.

  1. Deleted User

    Deleted User

    Guest

    Hi, I have an object and I want it to keep it's position relative to it's parent pretty much how a fixed joint would work.

    Any idea on how to do this ?
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Simply make the one object a child of the other object in the hierarchy. All child GameObjects automatically position themselves relative to their parent GameObject.