0

How I can make one object’s pivot point be another object?

Hello I'm pretty new to Unity, so I dont know how to do many basic things. Recently I wanted make one object’s pivot point be another object. I tried making the second one (the one who will rotate) child of the fixed one but didn’t get what I wanted. Please tell me if you know a solution. Thanks.

1st Aug 2023, 10:35 AM
Nano
2 ответов
0
Hello! In Unity, you can achieve the effect of making one object's pivot point be another object by using a combination of parenting and empty GameObjects. Here's a step-by-step guide on how to do it: Create Empty GameObject: Create an empty GameObject (Right-click in the Hierarchy > Create Empty) at the location where you want the pivot point to be. Set Pivot Object as Child: Make the object that you want to rotate (the second one) a child of the empty GameObject you created in step 1. Select the second object in the Hierarchy, then drag and drop it onto the empty GameObject.
18th Aug 2023, 2:49 AM
Anukalp
Anukalp - avatar
0
3. Adjust Position: Adjust the position of the second object within the empty GameObject to achieve the desired rotation effect. You can do this by selecting the second object and using the Move tool to position it relative to the empty GameObject. 4. Rotate Empty GameObject: To rotate the second object around the pivot point of the empty GameObject, simply rotate the empty GameObject itself. Any rotation you apply to the empty GameObject will affect the child (second) object. By following these steps, you're effectively changing the pivot point of the second object to be the position of the empty GameObject. Rotating the empty GameObject will then rotate the second object around this new pivot point.
18th Aug 2023, 2:51 AM
Anukalp
Anukalp - avatar