Unity - Scripting API: Handles.RotationHandle

Suggest a change

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.

Close

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.

Close

Cancel

Parameters

Parameter Description
rotation The orientation of the handle in 3D space.
position The center of the handle in 3D space.
ids The control IDs of the handles. Use RotationHandleIds.default.

Returns

Quaternion The new rotation 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 a Scene view rotation handle.

This will behave like the built-in rotation tool in Unity. Note: Use HandleUtility.GetHandleSize where you might want to have constant screen-sized handles.


Rotate the attached object from the Rotation Handle.

And the script attached to this GameObject: