Transform Drawer

  05. Enhanced Drawers No Comments

The drawer for the transform component offers multiple improvements over the default editor.

Snapping

It is possible to enable snapping for values of inspected transforms.

To do so, you will first need to turn on snapping control visibility using the Toggle Snap Controls button found on the header toolbar of the transform.
You should then see Snap controls appear next to the Position, Rotation and Scale members of the transform drawer that allow you to toggle snapping mode on for each one individually.

When you adjust values inside transform drawer with snapping enabled, the values are snapped to increments based on the current Snap settings.

You can adjust snap settings by right-clicking the header of the transform drawer or the Toggle Snap Controls button and selecting the “Edit Snap Settings…” context menu item.

World Space Mode

It is possible to display the state of inspected Transforms in world coordinate space, instead of the default local coordinate space.

To change between coordinate space modes, click the coordinate space toggle button on the header toolbar.

All Prefixes Are Draggable

In addition to being able to drag the prefix labels of the float fields to adjust their values, you can also drag the prefix labels of their parents to do the same.

When you drag the “Position” prefix label, the transform position gets adjusted along the forward-facing axis (moves forwards / backwards).

When you drag the “Rotation” prefix label, the transform rotates around the vertical axis (turns left / right).

When you drag the “Scale” prefix label, the transform is scaled along all three axes (grows / shrinks).

Infinite Axis Line

When you mouseover or drag the prefix of any member of the transform position drawer, an infinite line will be drawn in the Scene view, clearing visualizing where exactly you will be able to move the transform by dragging.

Nonuniform Multi-Target Value Adjustments

When you are editing multiple targets in merged multi-editing mode, and you adjust the value of any drawer target by dragging its prefix label, all values will be adjusted separately from each other.

This is different from how the default editor works, where all targets are set to the same value when you start dragging.

Additionally, the speed at which the values of transform members change when their prefix is being dragged has been tweaked separately for each member.
For example, you you no longer need to move your cursor across the distance of the whole screen to rotate an object 180 degrees.

Reset Without Affecting Children

You can reset the position, rotation and scale of the transform, without it affecting the values of its child transforms (in world space).

This can be done by right-clicking the header of the drawer, or the prefix label of the position, rotation or scale drawers, and selecting the context menu item “Reset Without Affecting Children“.

Both “Reset” and “Reset Without Affecting Children” commands reset values in local space (relative to parent) by default, but when world space mode is active, the values are reset in world space.

Align With NavMesh

It is possible to align the position of the target transforms with the NavMesh in the current scene.

What this does is, for each target, it finds the point on the NavMesh that is closest to the target’s position, and if one is found within a distance threshold of 10 units, it moves the target to that point.

To align the targets of transform drawer with the NavMesh, you can right-click the header of the drawer, or the prefix label of the position drawer, and select the context menu item “Align With NavMesh”.

Ground

Another new feature is the possibility to ground targets.

What this does is, for each transform target, it casts a ray directly downwards from its position, and if the ray hits a point on a collider on the way down, the target is moved to that point.

To ground a transform right-click the header of the transform drawer, or the prefix label of the position drawer, and select the menu item Ground.