Unable to change the center of overall gameobject (Barry parent)

Hi folks. I am relatively new to game development. I am working on a game from Udemy course where I have a character named Barry. My Barry character comprises of two parts, the top and the bottom. The center of overall gameobject Barry is located somewhat near the bottom. Since, in my game I need Barry to rotate at its middle, so I need to move the center towards the middle. I tried selecting all the child gameobjects (top and bottom) and moving them, but the center of the overall gameobject Barry moves along with it and remains near the bottom only.
So, it would be great if someone could help me out with this.

Hi Aman,

Welcome back to our community. :slight_smile:

What you describe sounds correct. You cannot change the pivot point or the centre of a game object. However, what you could do is to move the children relative to the parent position. Barry rotates around the pivot point of the root game object.

Did this help?


See also:

Hello Nina, you misunderstood Aman’s question. I am having the same issue. He is describing that he did exactly what you are saying he needs to do, and saying it does not work. Your solution is for him to do exactly what he already did, which the video already told us to do. This is why there is an issue here.

Of course it has been a few days, so Aman, if you have found a solution, please do let me know. I would also appreciate knowing the solution.

1 Like

To elaborate, Nina, the task as you know is that what we have to do is move only the child objects, while the parent object stays in place. But the problem is that when we try, the parent moves too, and so it does not offset relative to the children, instead producing the exact same result.

What Nina said is accurate. As far as I know, outside the UI system, Unity doesn’t allow for moving the pivot point of objects, so the best you can get is this type of “hack” fix. While it isn’t optimal, it is the best solution.

You are also misunderstood. What Nina said is what the video said to do, and what the video said to do is what the original poster said they already did. Nobody is arguing against the fact that it’s supposed to be the solution: we have multiple confirmation about that and the original question even mentions it. The issue is that this advised solution isn’t working.

1 Like

Please read the third sentence of my first post where I literally say: “He is describing that he did exactly what you are saying he needs to do, and saying it does not work.”

And to be clear I don’t believe that this is because of someone being wrong (the video shows that solution working, so it definitely is right). I believe that it is due to some bug or a version mismatch perhaps, or that we committed the same small mistake earlier in the lessons. So we ought to be looking for a workaround if it’s a bug, or the root cause if we screwed up part way through the lesson. Which is why he, and I at this point, are looking for help.

Hi @TheZnayx,

Thank you for your feedback.

I understood that Aman wanted to rotate his Barry game object but the rotation did not look good because of the pivot point.


Maybe my explanation in answer #1 was not clear, so I’m trying to elaborate on the subject a bit further:

In computer graphics, the pivot point contains the information on the position, rotation and scale of an object (depends on the software). The graphics are rendered relative to it. Furthermore, the child game objects have pivot points too, and those pivot points are relative to the pivot point of the parent game object. At least, that’s the case in Unity.

If the head sprite is attached to a child game object, the head sprite gets rendered relative to the child. And the child gets rendered relative to the parent.

If we have a root game object (Barry) with two child game objects (head and body), and we rotate Barry, the child game objects rotate relative to the Barry’s pivot point. The child game objects do not rotate within the local space. You can easily verify that by rotating Barry and checking the Transform object of the children afterwards.

When moving the children, the pivot point of the parent does not move along with them. When selecting the children including the parent, the parent moves along with the children. When selecting multiple game objects, the 3D transform gizmo is not “the” pivot point. What the 3D transform gizmo represents depends on what the two buttons in the top horizontal menu say. In my case, I keep them set to “Pivot | Global”.

I hope that makes sense so far.


You are right: There could be a bug in your case. Since I assume that you are looking help, it would be great if you could share information on your project and your version of Unity. However, please refrain from making assumptions regarding other people’s projects. In the end, this is Aman’s thread, and we do not know if my answer helped him. Maybe it did, maybe it didn’t. I never claimed that my solution works for everybody. While I appreciate constructive feedback, I do not appreciate assumptions. In most cases, we misunderstand things due to the lack of information.

Here is what I expect from constructive feedback:

  • Let me know that you tested my suggestion and that it did not solve the problem for you.
  • Describe the problem in other words if you feel I misunderstood it (= what you expected to see and what happened instead).
  • Describe what you have.
  • Describe step by step what you did.
  • Provide additional information if you feel it could help me understand and maybe also recreate the problem.

The more relevant information you share, the more likely it is that you will get a helpful answer.

The best would probably be to create your own thread where you describe your problem and share screenshots of what you did in Unity, maybe also screenshots or a video of the problem. You could also link Amand’s thread and mention that you tried what I suggested in answer #1 and that it didn’t solve the problem. That would be efficient and constructive. :slight_smile:

Have a nice weekend!

Hello Nina, I appreciate you getting back to this thread. While I do agree I am making an assumption, which I’m sure we both know what they say about assumptions, I believe the odds that I am misunderstanding the issue are extremely minimal. I will quote Aman, and then quote you.

Aman: “I tried selecting all the child gameobjects (top and bottom) and moving them, but the center of the overall gameobject Barry moves along with it and remains near the bottom only.”

You: “However, what you could do is to move the children relative to the parent position.”

I think that my conclusion that you told him to do what he already did is fairly well-founded. However, I will take your advice - I will open my own thread on this issue and ask for myself, since Aman has not gotten back on this issue so he may well have already resolved things, whether as a consequence of research or your advice.

I would like to finish by quoting the section of video that guided us to do what you are suggesting that we do:

Video “Set Up Our Character”, timestamp 3:14
“Now if we click back on Barry you can see that the center of the overall game object – the bottom and the top – is around the bottom-ish of our object and when we rotate, it’s going to rotate around this pivot point. So what I could do is grab ‘Top’ and the ‘Bottom’ – just hold shift and then my left mouse button – so now I’m moving the children game objects. I’m gonna move them down a bit and now when I click back on Barry you see the middle of Barry or where Barry the parent is in the world in relation to where the children are – the children are kind of in the middle of where the parent is.”

Assumptions are not necessarily bad. In programming, we make assumptions all day. That’s called debugging.

I think that my conclusion that you told him to do what he already did is fairly well-founded.

Not necessarily. I still do not know what “center” means in this context. Is it the pivot point of the root game object? Or is it just the 3D transform gizmo that appears when you select one or more game objects?

Also: Is the problem just the visual position of the “center” (whatever it is) or is the problem something else, e.g. “Barry does not rotate around his center when I rotate him, instead the center seems to be at the bottom, I would like to move the center towards the middle”.

That’s what I mean by “misunderstanding”.

As somebody who has been using Unity for many years and who has been a teaching assistent in this course for several years, I’m aware that beginners do not always use the correct terminology. They also describe what they think is happening, and based on that assumption, their description might be misleading or even wrong because they do not know what’s really going on. It is part of my job to interpret what they are trying to tell me. There is a lot of room for misunderstandings.

Maybe I should have asked Amand to define the “center” and elaborate on his problem a bit further instead of assuming that he had the same problem as most other students who struggled with moving children relative to the parent. :slight_smile:

Thanks for sharing the video. That’s helpful information. If I know what exactly you are trying to achieve and if I know what you have in your project, I will very likely be able to tell you why you are not getting the same result as Rick or another instructor.

More often than not, it’ll mean the instructions were not properly followed, perhaps through their lack of understanding. It can take some people a while to understand how Unity works.

It can take a while for people to understand Unity to a point where their questions mean what they’re saying. Take for instance:

The only way for this to happen is if you don’t understand the meaning of child/parent within the context of this topic. Moving the children does not move the parent, however, moving the parent will move the children. If the parent is moving when you’re moving the children, it means they’re either not children or the parent is also selected.

I hear “I did exactly what was done in the video” time and time again. 99.99% of the time, it means the poster didn’t follow and doesn’t know what wasn’t followed and that’s fine. It’s part of the learning process. 0.01% of the time it’s a bug. I think in my time, I’ve come across two instances where it was a bug/differences in versions. The chances of coming across a bug while following a tutorial is so rare, it’s generally safe to assume you’ve made a mistake.

I believe the issue for you and the OP is a misunderstanding of this part of the fundamentals. Understanding Ninas original solution is what I believe you need. Maybe going back through that section of the course one or two more times will help.

Well you’ll be happy to know, Michael, that after I posted my own question thread for my matching issue, Nina was able to find the issue and you are incorrect. My added detail helped and she determined the cause without a single further question at that point. It is quite likely (but not guaranteed, as he has not come back yet) that Aman has the same issue.

In short, moving the children does move the parent’s tool handle if your tool handle mode is set to Center - the solution being my Unity tool handle mode should have been set to Pivot. This was not mentioned in the video, I’d assume because Unity defaults to Pivot normally. I likely had it on Center (and Aman too) due to pressing buttons earlier in the course for exploration purposes. The video had no reason to assume we made such a choice, and so doesn’t mention it.

So you are simultaneously wrong that it’s a misunderstanding of fundamentals, and wrong that the children never move the parents (need the right tool toggle), and wrong that Nina’s original solution applied, and wrong that it was due to instructions being incorrectly followed.

I won’t fault you on these assumptions though - this first couple games in the course are relatively beginner-targeted, so the odds would not be small that we could make basic misunderstandings and fall victim to Dunning-Kruger. But in this specific case, you were incorrect.

I do apologize to Nina for continuing this thread. I hope the discourse has managed to resolve the original issue, wherever the working advice came from. If you do read this, Aman, in case it helps, please look at my thread, as Nina provided a helpful screenshot.

4 Likes

Since TheZnayx’ issue got solved in their own thread, I’m leaving the link here for other students struggling with the same problem:

I’m closing this thread now, so we can head back to our projects. In the end, almost nobody cares who is right or wrong. If you don’t believe me ask some random person in the street whether they care if some random Nina on the internet is right or wrong. I’m sure they don’t.

What we hopefully learnt from this discussion: Describing problems is not easy, and there is always room for misunderstandings. Nobody is perfect.

In our community, the goal is to improve our skills as game developers. And this is how we should talk with one another: from one game developer to another. We are not here to “be right”, to show off or to belittle other people.

Instead, we want to share our knowledge, solve problems regarding game development and contribute to a positive, welcoming and constructive community.

1 Like

Privacy & Terms