public void DrawOwnerGizmos() { #if UNITY_EDITOR Vector3 _owner_pos = m_Owner.transform.position; _owner_pos.y = GetLevel(); CustomGizmos.Triangle(_owner_pos, m_Owner.transform.forward, 2, 35); if (m_creature_control.Creature.Move.FieldOfView > 0) { float _angle = m_creature_control.Creature.Move.FieldOfView; float _distance = m_creature_control.Creature.Move.VisualRange; if (_distance == 0) { _distance = 1.5f; } float _degree = CustomGizmos.GetBestDegrees(_distance, _angle); CustomGizmos.ArrowArc(m_Owner.transform, _distance, _degree, -_angle, _angle, GetLevel()); if (_angle < 180) { Vector3 _left_pos = Tools.GetDirectionPosition(m_Owner.transform, -_angle, _distance); Vector3 _right_pos = Tools.GetDirectionPosition(m_Owner.transform, _angle, _distance); CustomGizmos.OffsetPath(m_Owner.transform.position, 2, _left_pos, 1); CustomGizmos.OffsetPath(m_Owner.transform.position, 2, _right_pos, 1); } } if (m_creature_control.Creature.Move.GroundOrientation == GroundOrientationType.NONE || m_creature_control.Creature.Move.GroundOrientation == GroundOrientationType.QUADRUPED) { if (m_creature_control.Creature.Move.GroundOrientationPlus) { UnityEditor.Handles.CubeCap(0, m_creature_control.Creature.Move.FrontLeftPositionGround, m_Owner.transform.rotation, 0.1f); UnityEditor.Handles.CubeCap(0, m_creature_control.Creature.Move.BackLeftPositionGround, m_Owner.transform.rotation, 0.1f); UnityEditor.Handles.CubeCap(0, m_creature_control.Creature.Move.FrontRightPositionGround, m_Owner.transform.rotation, 0.1f); UnityEditor.Handles.CubeCap(0, m_creature_control.Creature.Move.BackRightPositionGround, m_Owner.transform.rotation, 0.1f); Gizmos.DrawLine(m_creature_control.Creature.Move.FrontLeftPositionGround, m_creature_control.Creature.Move.FrontLeftPosition); Gizmos.DrawLine(m_creature_control.Creature.Move.BackLeftPositionGround, m_creature_control.Creature.Move.BackLeftPosition); Gizmos.DrawLine(m_creature_control.Creature.Move.FrontRightPositionGround, m_creature_control.Creature.Move.FrontRightPosition); Gizmos.DrawLine(m_creature_control.Creature.Move.BackRightPositionGround, m_creature_control.Creature.Move.BackRightPosition); UnityEditor.Handles.CubeCap(0, m_creature_control.Creature.Move.FrontLeftPosition, m_Owner.transform.rotation, 0.1f); UnityEditor.Handles.CubeCap(0, m_creature_control.Creature.Move.BackLeftPosition, m_Owner.transform.rotation, 0.1f); UnityEditor.Handles.CubeCap(0, m_creature_control.Creature.Move.FrontRightPosition, m_Owner.transform.rotation, 0.1f); UnityEditor.Handles.CubeCap(0, m_creature_control.Creature.Move.BackRightPosition, m_Owner.transform.rotation, 0.1f); } } #endif }