Unity: How to rotate or scale around any point - Pivot Cursor Tool

Published: 22 August 2022
on channel: KAMGAM
476
2

There are many "pivot modifier" tools but they all either use parenting or modify the source model. Pivot cursor is a non-destructive way to handle pivots.
Asset Store Link: https://assetstore.unity.com/packages...

This is for all those who have to routinely rotate and scale around an arbitrary point and want to do that conveniently.

What does it do exactly?

● It introduces a virtual pivot (called "cursor")
It is used as a transformation origin. Simply press "v" while using the rotate or scale tool and it will pop up. Those of you who know Blender will find it kinda familiar.

● Rotate and scale around any point
Do it without any hierarchy shenanigans (aka parenting).

● Scale two axis at once
Hold SHIFT while dragging one axis to scale the other two. The used key can be changed in the settings.

● Works right there in the SceneView
Implemented as a custom tool which, once enabled, uses all your familiar shortcuts (shortcut manager compatible!)

● Snapping & Framing
Snapping your pivot to any vertex has never been easier. To focus on it press "F" (can be changed in the settings).

● Parenting tools
Parent or unparent your objects with a single click.

● Supports Unity 2019, 2020, 2021, 2022, ... (LTS)

● Full source code included
You can see how it's done and make changes if needed.


What does it NOT do?

This not an "edit the pivot" tool. There already are great tools to do that. This is quite the opposite.


Use cases
Here are some of the things I use this for (and why I made it in the first place).

● Align skinned meshes with the environment.

● Imagine importing a third party asset. Then you find out that the pivot is at a random position (think of trees with a pivot on top). Often you need to rotate and scale from somewhere specific (like the bottom). Usually I'd reparent this but for quick iteration it's convenient to use it as is. Especially during prototyping. "No need to clean it up yet. After all it's just a deco."

● Rotating a huge object around one specific position (doesn't have to be a vertex). If you are close to it then the pivot is often off-screen. Now with the cursor you can have the gizmo right in front of you. How convenient!

● Reparenting in the hierarchy is not very nice. With the "create parent" or "extract children" buttons it can be done super quickly. No need to touch the hierarchy window at all.

● Press F to focus on the selected vertex (cursor). Yes, you can press the middle mouse button too but that does not focus the exact vertex.


Watch video Unity: How to rotate or scale around any point - Pivot Cursor Tool online without registration, duration hours minute second in high quality. This video was added by user KAMGAM 22 August 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 476 once and liked it 2 people.