Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by Borislav.Purplebeard · Jun 26, 2015 at 06:08 PM · cameragameobjectpositionparentingparent-child

GameObject with 0,0,0 position not being in the center

I have a rather big GameObject which is parenting many other game objects, and when I try to align the parent game object to the 0,0,0 coordinates, it does not go there, it is like its pivot point is far behind the object... Butif I give these coordinates to the Camera object, it goes exactly where it should, when its position is set to 0,0,0.

So why is this GameObject not being centered?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Borislav.Purplebeard · Jun 29, 2015 at 06:19 AM 0
Share

shouldnt the parent object be the priority when setting coordinates? after all, it is a PARENT object

5 Replies

· Add your reply
  • Sort: 
avatar image
6
Best Answer

Answer by GiyomuGames · Jun 29, 2015 at 06:26 AM

I am guessing that your children objects are far from the (0, 0, 0) of the parent (your "big" game object). Therefore when you put your big object on (0, 0, 0) everything seems at the wrong place. So maybe check again the coordinates of each children and make sure they are where they are supposed to be relatively to the (0, 0, 0) of the parent.

For example if the child object is at (2, 2, 0), then even if you put the parent object at (0, 0, 0) your child object will not be at the center.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by NeverHopeless · Jun 29, 2015 at 06:31 AM

Have you seen "reset" option in inspector under each component you attached ?

Move your child game object to root position and align the parent first using reset, then again move the child game object to initial position in hierarchy. To summarize this, your each game object should be first reset to origin then re-position/parent-child them as per your need.

Hope it helps.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by ristophonics · Feb 03, 2019 at 10:26 PM

If you created the asset yourself: Step 1: Its much more likely that your gameobject is referencing its origin from the program in which it was created, which may not be where you want it to be in Unity. To fix this go back to your modeling program and move your asset to the origin then re-Export and it should be where you want in Unity.

Step 2: If otherwise place an empty gameobject at (0,0,0) and make your larger object a child and hit Reset on its transform. If the empty parent's pivot does not match your gamebject's reset Pivot then your gameobject is not centered on the origin. Go back to step 1.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Giannigiardinelli · Feb 05, 2019 at 09:44 AM 0
Share

Thank you for your reply I put my project to odds on standby and when I would work on it I would do with your advice and tell you if the problem was solved! Thanking you

avatar image
0

Answer by Giannigiardinelli · Mar 26, 2018 at 06:02 PM

Hi ! I have exactly the same problem!


@GiyomuGames

I am guessing that your children objects are far from the (0, 0, 0) <

alt text


I'm checking all my "children" well at 0, 0, 0 But apparently the problem is maybe the GameObject because if you look at the image the position of "Transform" is well at the location 0 of the scene

BUT !

That of the "Mech" select "In Orange" is not at all in the center!

While everything is fine at 0, 0, 0 is this a problem when importing my 3d model into ".obj" that makes there any problem or does it se very big too can be?

The "Scale" in "Transform" is not 1, 1, 1 but I set it to "0.012" here


alt text


Is there something I don't know how to use in unity or is it something else?

Thanks in advance for helping me!


clipboard03.jpg (15.7 kB)
clipboard02.jpg (31.2 kB)
Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image GiyomuGames · Mar 26, 2018 at 11:07 PM 0
Share

In your case I am guessing that the 3D model coordinates are off in the 3D software.

avatar image Giannigiardinelli GiyomuGames · Mar 26, 2018 at 11:17 PM 0
Share

Thank you for the answer. I just wrote a post about my problem! Is it weird how I have to activate my model's coordinates on unity?

link text

avatar image Giannigiardinelli GiyomuGames · Mar 27, 2018 at 09:28 AM 0
Share

How coordinates my 3D $$anonymous$$odel please ?! No one want help me...

avatar image GiyomuGames Giannigiardinelli · Mar 27, 2018 at 11:06 PM 0
Share

I'm sorry I don't know. That's a question related to the 3D software you used.

Show more comments
avatar image
0

Answer by zamo2022 · Dec 07, 2020 at 08:32 PM

This is what worked for me and it is extremely simple.

object.transform.position = object.transform.parent.position;

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 3D : Objects that were parented under empty object are changing their position after I hit play 0 Answers

Getting camera to stick to object 1 Answer

How to keep the same position of the object instead of camera 0 Answers

Getting the topmost parent 1 Answer

When I set an object to be the child of another object, the child object does not anchor to the parent's position for about 25 seconds 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges