public void DrawGizmos() { if (!transform.position.EqualSimilar(transform.parent.position)) { GizmosExtend.DrawLine(transform.position, transform.parent.position, m_Color.SetAlpha(Mathf.PingPong(Time.time, m_MaxAlpha))); } }
public void DrawGizmos() { #if UNITY_EDITOR if (m_Preset == null) { return; } Vector3 right = m_InitTransform.right, forward = m_InitTransform.forward; Color oldColor = UnityEditor.Handles.color; UnityEditor.Handles.color = m_Color; float radius = m_Preset.m_VirtualPosition.m_Camera.m_Coordinates.radius; UnityEditor.Handles.DrawSolidArc(transform.position, -right, forward, m_Preset.m_ClampAngle.m_ElevationUpRange, radius); UnityEditor.Handles.DrawSolidArc(transform.position, right, forward, m_Preset.m_ClampAngle.m_ElevationDownRange, radius); GizmosExtend.DrawLine(m_InitTransform.position, m_InitTransform.TransformPoint(0f, 0f, radius), m_Pointer); UnityEditor.Handles.color = oldColor; #endif }
public void DrawGizmos() { m_ChaseTargetOffsetHandler.DrawGizmos(); m_YawHandler.DrawGizmos(); m_PitchHandler.DrawGizmos(); m_CameraOffsetHandler.DrawGizmos(); m_CameraPivot.DrawGizmos(); // Label string info = string.Format("{0}\nPolar = {1:F1}\nElevation = {2:F1}\nRadius = {3:F3}", m_Preset.name, m_Preset.m_VirtualPosition.m_Camera.m_Coordinates.Yaw, m_Preset.m_VirtualPosition.m_Camera.m_Coordinates.Pitch, m_Preset.m_VirtualPosition.m_Camera.m_Coordinates.radius); GizmosExtend.DrawLabel(m_CameraOrbitPivot.transform.position + (Vector3.down * 0.2f), info, GUI.skin.textArea); GizmosExtend.DrawLine(m_Preset.Instance.CameraPivot.transform.position, m_Preset.Instance.GetCameraLookAt().position, m_Preset.m_DebugColor); GizmosExtend.DrawLocalCube(m_Preset.Instance.m_CameraOffsetHandler.transform.parent, Vector3.one * .1f, m_Preset.m_DebugColor); GizmosExtend.DrawLocalCube(m_Preset.Instance.CameraPivot.transform, Vector3.one * .15f, m_Preset.m_DebugColor); if (m_Preset.m_VirtualPosition.m_EnableLookTarget) { GizmosExtend.DrawSphere(m_Preset.Instance.GetCameraLookAt().position, .04f, m_Preset.m_DebugColor); } }