Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by SpaghettiCloud · Aug 09, 2019 at 05:27 PM · viewportpivot-pointchild-to-gameobject

The child object doesn't follow it's parent. What's the cause of this?

I'm using Unity 2019.02.0f1 Personal Edition. I noticed a strange behaviour of my GameObjects in the viewport of my 2D project. The hierarchy looks like this: -Enemy an empty GameObject, position: 0, 0, 0 scale: 1, 1, 1
-GFX (child of Enemy) GameObject with sprite, position: 0, 0, 0 scale: 10, 10, 1
- Weapons (child of Enemy) empty GameObject position: 0, 0, 0 scale 1, 1, 1
-Left Weapon (child of Weapons) GameObject with sprite position: -10.5, 0, 0 scale 7, 7, 1
-Right Weapon (child of Weapons) GameObject with sprite position: 10.5, 0, 0 scale 7, 7, 1
If it isn't clear look at this screenshot: alt text When the Enemy object is at 0, 0, 0 position the pivot looks normal - it's in the middle as its supposed to But when I move it the rest of the objects doesn't follow and the pivot (crossed arrows) are far away from the rest. I looks like this: alt text The left weapon's pivot moves, but right one's stays in place and the whole enemy pivot is far away.
Does anyone know the cause of this. If you want to recreate this behaviour:

  1. Donload, unzip and import the Unity Package Download this

  2. Place the enemy prefab into the scene (preferrebly at 0, 0, 0)

  3. Move around in any direction.

Thank you in advance.

wierd.png (71.3 kB)
hierarchy.png (13.2 kB)
Comment
Add comment
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

1 Reply

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

Answer by Vega4Life · Aug 09, 2019 at 07:02 PM

It's possible your handler is set to 'Center'. Try changing it to Pivot.


alt text


pivot.png (4.5 kB)
Comment
Add comment · Show 2 · 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 SpaghettiCloud · Aug 09, 2019 at 07:46 PM 0
Share

Thank you so much. I did solve the problem. Could you explain or provide me link to further reading about this Center/Pivot and Local/Global things? That would be awesome. Again, thank you very very much.

avatar image Vega4Life SpaghettiCloud · Aug 09, 2019 at 08:13 PM 0
Share

This specific mode has two options: Pivot and Center. Pivot shows the actual pivot point of the selected object. Center shows the center of the rendering bounds - which is often different from the pivot point (but not the case for Unity's primitives).


Not matter which you choose, its an editor only thing. Picking center does not change how something is moved in code. It will always move via the Gameobjects pivot. Some people choose center because it may be easier to align something via its center in the editor as opposed to its pivot.

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

109 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Scene and Game views freak out during Play mode in 5.3.3 1 Answer

How can I "always" Lock View to an object in the editor window? 0 Answers

Get the center of multiple cubes at runtime (not the pivot) 1 Answer

After Rotating a Prefab, Transform.Position of children is inaccurate 1 Answer

The scrollrect viewport breaks when changing scene 3 Answers


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