Unity plug-in sharing - Adjust Pivot to modify the axis of the object

Installation and use:

 Unity Adjust Pivot -- UWA Questions and Answers | Open Source Library | Help Developers Find Better Solutions |

Download the AdjustPivot.unitypackage from this link, and then drag it into unity, as shown below:

 use:

1. First create a test Cube. At this time, the axis of the Cube is at the center of the entire cube.

2. Now start to adjust the axis, first create an empty object, and use it as a sub-object of the Cube, and adjust its position to the target axis position (if you want to change the axis to the lower left corner, then let the position of the empty object At the same position as the lower left corner of the Cube, and set the parent-child relationship), as follows, adjust the axis to the position of the red frame, the corner of the Cube

 

3. Open the settings panel, Window->Adjust Pivot

 

4. At this time, select the newly created hollow object with the axis in the Hierarchy panel, and in the Adjust Pivot setting box, click the ## Move Cube's pivot here button, and then you can change the axis of the Cube to the corner

 5. After the change is completed, you can delete the empty object under the Cube. At this time, when you rotate the Cube, you will find that it has started to rotate around the new axis.

The only disadvantage is that when the axis is changed, the collision of the object will also move accordingly, as shown in the figure below, the collision of the object also moves, and it does not fit the Cube model anymore, and manual adjustment is required

Guess you like

Origin blog.csdn.net/weixin_47952981/article/details/128336527