Handles
- ArrowCap
- BeginGUI
- Button
- CircleCap
- ClearCamera
- color
- ConeCap
- CubeCap
- currentCamera
- CylinderCap
- Disc
- DotCap
- DrawAAPolyLine
- DrawBezier
- DrawCamera
- DrawCapFunction
- DrawLine
- DrawPolyLine
- DrawSolidArc
- DrawSolidDisc
- DrawSolidRectangleWithOutline
- DrawWireArc
- DrawWireDisc
- EndGUI
- FreeMoveHandle
- FreeRotateHandle
- Label
- lighting
- matrix
- PositionHandle
- RadiusHandle
- RectangleCap
- RotationHandle
- ScaleHandle
- ScaleSlider
- ScaleValueHandle
- SetCamera
- Slider2D
- Slider
- SnapValue
- SphereCap
Handles.FreeRotateHandle 自由旋转控制柄
static function FreeRotateHandle (rotation : Quaternion, position : Vector3, size : float) : Quaternion
Parameters参数
- positionCenter of the handle in 3D space
在3D空间,控制柄的中心 -
rotationOrientation of the handle // 控制柄的方向
-
sizeThe size of the handle. Note: Use HandleUtility.GetHandleSize where you might want to have constant screen-sized handles.
控制柄的大小。注意,使用HandleUtility.GetHandleSize你可能希望有恒定的屏幕大小的控制柄。
Description描述
Make an unconstrained rotation handle.
创建不受约束的旋转控制柄。
The handle can rotate freely on all axes.
该控制柄所有轴可以自由旋转。
FreeRotate handle seen in the Scene View.
在场景视图看到的自由旋转控制柄。
// Create a simple rotate handle (half scale) on the
// target object that lets you freely rotate
// the Object Without having to select the "Rotate" button
//在target物体上,创建一个简单的旋转控制柄,让你可以自由旋转物体,不必选择Rotate按钮。
@CustomEditor (FreeRotate)
class FreeRotateHandleJS extends Editor {
function OnSceneGUI () {
target.rot = Handles.FreeRotateHandle(target.rot, target.transform.position, 0.5);
if (GUI.changed)
EditorUtility.SetDirty (target);
}
}
And the script attached to this Handle:
该脚本附加到这个控制柄物体:
@script ExecuteInEditMode()
var rot : Quaternion = Quaternion.identity;
function Update () {
transform.rotation = rot;
}
最后修改:2011年7月7日 Thursday 18:40