Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Keep child transform to parent transform through scripting

Discussion in 'Physics' started by Agln, Aug 19, 2019.

  1. Agln

    Agln

    Joined:
    Aug 14, 2019
    Posts:
    3
    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:
    777
    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.