position | Center of the handle in 3D space. |
Make a 3D Scene view position handle.
//Create a position handle that always looks at "lookAtPoint" in LookAtPoint.js @CustomEditor (LookAtPoint) class PositionHandleJS extends Editor { function OnSceneGUI () { target.lookAtPoint = Handles.PositionHandle (target.lookAtPoint, Quaternion.identity); if (GUI.changed) EditorUtility.SetDirty (target); } }
// LookAtPoint.js // This Script has to be outside of the editor folder. // // Usage: Just Place this script on the object you want to work the handle with. @script ExecuteInEditMode() var lookAtPoint = Vector3.zero; function Update () { transform.LookAt (lookAtPoint); }