how to prevent Parent location to be manipulated by childs objects location

Hi there is a empty gameobject and has about 30 child and every one of them has different location.Problem is when parent location is shown 0 0 0 actually isn’t when I try to ınstatiate or move a object by parents transform location. Location is wrong

I’m not sure if I understand what it is that you’re asking. Parent locations are not manipulated by child objects unless a script specifically does that. I’m guessing you’re trying to set a child objects transform location relative to the parent? To do that you would use localPosition.

This isn’t really how transform hierarchies work. The child’s position is dependant on the parent, not the other way around.

Do note that the inspector shows a transform’s local position, not it’s world position. So if this ‘parent’, is the child of something else, it is probably (0, 0, 0) local to its parent.

this 2 objects have different tranform.position but they are in the same location
8871261--1211406--bus.png 8871261--1211409--dus.png

I uploaded 2 pics 2 objects which both of them are parent has different tranform.position and they are on the same spot.

The transform handle in your image clearly demonstrates they are in different physical positions.

You have set your gizmos mode to center, not to pivot. In really rare situations center may be useful. However you should keep the gizmos mode to pivot and local whenever possible.

This does not change the position of the objects, just where and how the gizmos are displayed.

1 Like

Just in case you don’t know what I’m talking about, it’s about those two settings:
8872293--1211424--upload_2023-3-13_10-1-45.png

1 Like

same tranfrom.position different location
8872302--1211427--deys.png 8872302--1211430--heys.png

Thank you so much it worked I have been struggling about hours since yesterday