Unity - Scripting API: Handles.FreeMoveHandle
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Parameters
| Parameter | Description |
|---|---|
| position | The position of the handle in the space of Handles.matrix. |
| size | The size of the handle in the space of Handles.matrix. Use HandleUtility.GetHandleSize if you want a constant screen-space size. |
| snap | The snap increment on all axes. See Handles.SnapValue. |
| capFunction | The function to call for doing the actual drawing. |
| controlID | The control ID for the handle. |
Returns
Vector3 The new value modified by the user's interaction with the handle. If the user has not moved the handle, it will return the same value as you passed into the function.
Description
Make an unconstrained movement handle.
This handle can move freely in all directions. Hold down Ctrl (Cmd on macOS) to snap to the grid (see PositioningGameObjects). Hold Ctrl-Shift (Cmd-Shift on macOS) to snap the object to any Collider surface under the mouse pointer.

Free Move handle in the Scene View.
Add the following script to your Assets folder as FreeMoveHandleExample.cs and add the FreeMoveHandleExample component to an object in a Scene.
Add the following script to Assets/Editor as FreeMoveHandleExampleEditor.cs and select the object with the FreeMoveHandleExample component.