- Home /
[2D] - Moving the child moves the parent <-- Unwanted behavior
Hello everyone,
I'm in trouble for some reason I need to offset a sprite from its gameobject. The most easy and popular way to do it is by creating a parent GO that holds the child sprite and then offset the sprite via its transform. I mean it's easy buuuuuut ... it doesn't work for me, the parent moves with the child and so the sprite doesn't offset. I tried everything to see if I'm missing something but no.
I made a video at that link to show you how I'm doing it : https://youtu.be/BCEl322e9F4
Thank you for reading, pls send help :'(
Your parent object is not being moved, it's just how Unity shows the transform gizmo since the parent object does not have any renderer component. (From what i saw in the video you provided)
Oh, but on other videos I saw, some people are doing the exact same thing as me and the transform guizmo of the parent object is not at the center of the sprite. (For example : https://youtu.be/mCIkCXz9mxI?t=511 there's a timecode to the exact moment I'm referring to)
Thanks a lot for your answer anyway !
Answer by SteenPetersen · May 22, 2020 at 10:25 PM
Click 'pivot' instead of 'center' in the top bar. It'll make things more clear for you, of why it looks like the parent is moving.
Your answer
![](https://koobas.hobune.stream/wayback/20220612234952im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Setting parent of instantiated sprite 2 Answers
Achieving something like LookAt but with the X axis. 3 Answers
Sprite is not shown moving 1 Answer