Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Bug About parent-child movement by transform.SetParent of charactercontroller object

Discussion in 'Editor & General Support' started by kumao23, Jul 16, 2021.

  1. kumao23

    kumao23

    Joined:
    Jan 19, 2015
    Posts:
    11
    SetParent" to move the parent and child of the object without a charactercontroller, but if a charactercontroller is attached to the object, the object falls without moving the parent and child.
    However, if a charactercontroller is attached to the object, the object will not move and will fall.
    This is an addendum.
    I recreated a new project with the minimum configuration. The parts I was using are still there.
    I have zipped the project file in the following page. If you can take a look at it, please let me know.

    https://firestorage.jp/download/483c6e64f7fc36f536d971df2f2ca914e4b77e59
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,412
    SetParent does NOT move anything. It changes the Transform relationship between two Transforms.

    How about instead you supply a link to the Unity documentation explaining how this setup SHOULD work, and then explain how your experience differs from what the documentation promises?

    A diagram showing transform hierarchies might be useful in this case, as well as any other descriptive illustrations.
     
  3. kumao23

    kumao23

    Joined:
    Jan 19, 2015
    Posts:
    11
    Thanks Kurt-Dekker!
    I'm so thrilled to be following you again!
    I tried a few more things, and managed to solve the problem successfully by not using the parent-child relationship.
    Thank you again!