// Update is called once per frame void Update() { if (m_DisplayQuaternion) { QuaternionDisplayService.Display(transform.name + ".rotation", transform.rotation, transform.position, m_DisplayQuaternionColor, m_DisplayQuaternionVectorSizeMultiplier, true); } if (m_DisplayEulerAngles) { EulerAnglesDisplayService.Display(transform.name + ".eulerAngles", transform.eulerAngles, m_DisplayEulerAnglesSpace == Space.Self?transform:null, m_DisplayEulerAnglesDistanceOnAxis, m_DisplayEulerAnglesColor); } }
public void DisplayUI() { if (!m_DisplayAngle) { return; } GUI.color = m_Color; Vector3 qVector; float qAngle; m_Q.ToAngleAxis(out qAngle, out qVector); if (qVector.IsVector3Valid()) { QuaternionDisplayService.DisplayText("angle = " + qAngle.ToString("N02") + " °", m_AnchorPos + qVector * m_VectorSizeMultiplier * .8f); } }
void Awake() { _instance = this; }