private void DrawTranslateHandle() { MyHandleUtility.DrawLine(transform.position, transform.position + transform.right * _handleSize * 0.9f, GetColor(ControlType.TranslateX)); MyHandleUtility.DrawLine(transform.position, transform.position + transform.up * _handleSize * 0.9f, GetColor(ControlType.TranslateY)); MyHandleUtility.DrawLine(transform.position, transform.position + transform.forward * _handleSize * 0.9f, GetColor(ControlType.TranslateZ)); MyHandleUtility.DrawConeCap(transform.position + transform.right * _handleSize, Quaternion.LookRotation(transform.right), _handleSize * 0.2f, GetColor(ControlType.TranslateX)); MyHandleUtility.DrawConeCap(transform.position + transform.up * _handleSize, Quaternion.LookRotation(transform.up), _handleSize * 0.2f, GetColor(ControlType.TranslateY)); MyHandleUtility.DrawConeCap(transform.position + transform.forward * _handleSize, Quaternion.LookRotation(transform.forward), _handleSize * 0.2f, GetColor(ControlType.TranslateZ)); }
private void DrawScaleHandle() { MyHandleUtility.DrawLine(transform.position, transform.position + transform.right * (_handleSize * _drawScaleValue.x - _handleSize * 0.0500000007450581f), GetColor(ControlType.ScaleX)); MyHandleUtility.DrawLine(transform.position, transform.position + transform.up * (_handleSize * _drawScaleValue.y - _handleSize * 0.0500000007450581f), GetColor(ControlType.ScaleY)); MyHandleUtility.DrawLine(transform.position, transform.position + transform.forward * (_handleSize * _drawScaleValue.z - _handleSize * 0.0500000007450581f), GetColor(ControlType.ScaleZ)); MyHandleUtility.DrawCubeCap(transform.position, transform.rotation, _handleSize * 0.15f, GetColor(ControlType.ScaleCenter)); MyHandleUtility.DrawCubeCap(transform.position + transform.right * _handleSize * _drawScaleValue.x, transform.rotation, _handleSize * 0.1f, GetColor(ControlType.ScaleX)); MyHandleUtility.DrawCubeCap(transform.position + transform.up * _handleSize * _drawScaleValue.y, transform.rotation, _handleSize * 0.1f, GetColor(ControlType.ScaleY)); MyHandleUtility.DrawCubeCap(transform.position + transform.forward * _handleSize * _drawScaleValue.z, transform.rotation, _handleSize * 0.1f, GetColor(ControlType.ScaleZ)); }