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 /
This question was closed Oct 14, 2019 at 09:46 PM by Le-Pampelmuse for the following reason:

Question has been asked and answerd by a the user duck in 2010.

avatar image
-1
Question by Giantbean · Oct 14, 2019 at 05:46 PM · rotationtransformterraintranslateparent-child

Why do grouped Terrain objects move together but don't rotate as one?

I have an empty game object with multiple children added to the base object as a root parent. I can move the parent around and every child follows it but if I try to rotate the parent all the children rotate in different ways.

How can I make all the objects rotate around the empty root parent game object as if they where all one object with one central pivot point?

Is there some setting I need to flip? Everything I am searching and reading says the children should rotate with the parent by default but this does not seem to be correct in my case?

Any help would be greatly appreciated.

Edit: I updated the title of this post as i just tested with simple cubes and a blank game object. It seems things work fine and as expected with cubes but I am trying to make multiple terrains stay together when moved. Is this possible?

Comment
Add comment · Show 5
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 HappiiGamer · Oct 14, 2019 at 05:56 PM 0
Share

When you say rotate in different ways what do you mean? The child objects will keep their position and rotation unchanged relative to the root parent. They will rotate with respect to the world position. Is it not what happens?

avatar image Giantbean HappiiGamer · Oct 14, 2019 at 08:58 PM 0
Share

I hope I am understanding properly and explaining this right, I have a bunch of objects in a group. They line up edge to edge and when the parent object is rotated each child object moves around it but its not moving as one object. Its breaking into many objects with each child still facing the same direction it started in but moving in a circle around the root. I feel like that's a bad explanation but I hope it makes sense.

avatar image GrayLightGames Giantbean · Oct 14, 2019 at 09:09 PM 0
Share

So you mean it's like the position of the children are moving along the rotation, but the children are still oriented in their original orientation? As an example, if your object was a human figure and the children objects were feet, the feet are in the right place but are still oriented so the bottom of each foot is still pointed down, no matter how the whole parent object rotates?

avatar image Giantbean HappiiGamer · Oct 14, 2019 at 09:12 PM 0
Share

$$anonymous$$aybe this will help. alt text

grouprotationissue.jpg (33.4 kB)
avatar image Le-Pampelmuse · Oct 14, 2019 at 09:39 PM 0
Share

Edit: Someone else was quicker. Ignore.

Hi. Please provide more specific information when asking for help.

What Unity version? Can you recreate this behaviour in a new project? Provide screenshots, or even gifs and screen recordings.

How are you applying the rotation? With the editor gizmos, inspector values, scripts,etc.? Beginners often encounter unexpected rotation issues because they do things without knowing how rotation works. What kind of objects are you rotating?

In Unity there is no group feature for objects, only a scene hierarchy. If you create a new empty gameobject, create 5 cubes randomly, making them children of the empty object, and rotate it, thy will properly rotate along the pivot point of the parent.

If you do something custom, with UI elements or 3rd party 2D systems, they might need different handling than just parenting and rotating a transform.

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by GrayLightGames · Oct 14, 2019 at 08:50 PM

Hey @Giantbean... I just made an empty GameObject with 2 child SpriteRenderer objects and tried to replicate your issue. All three objects have a RectTransform component and both the anchor and pivot are centered on everything involved. If I rotate the parent empty object, they rotate exactly like you'd like, as one object with a central pivot point. I'd recommend you make a test object like this from scratch in your scene and see if it has the same problem. Otherwise, if you could describe the objects with a little more context, or post a screenshot with what is happening, someone may be able to solve what's going on in your case. Sounds frustrating, hang in there!

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 Giantbean · Oct 14, 2019 at 09:33 PM 0
Share

Thanks @GrayLightGames. I ran a test with simple cubes as well and it works. It seems the issue is the fact that i am working with terrains. Not sure how Unity handles them as opposed to basic geometry?

avatar image GrayLightGames Giantbean · Oct 14, 2019 at 09:40 PM 0
Share

Ah that must be it... I haven't used terrains myself, but one of the answers in This Question explains that "No, you can't rotate the terrain. It's not possible to tilt it, or to rotate it around the Y axis.

This is largely due to the many optimisations built-into the terrain engine code, which rely on it maintaining a fixed orientation." There is some mention of editor scripts that will let you rotate at a fixed amount, but if you're looking for a smooth arbitrary rotation, sounds difficult to achieve. Check the link though, you might find something there.

Follow this Question

Answers Answers and Comments

171 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 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

Move child objects in the opposite direction of parent object 0 Answers

On Finger Touch and Drag Rotate 3D Ball 2 Answers

Simultaneously translating and rotating 2D sprite? 1 Answer

Rotatating a character 2 Answers

transform.Translate but Transform has Rotation!=0 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