예제 #1
0
    // 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);
        }
    }
예제 #2
0
    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);
        }
    }
예제 #3
0
 void Awake()
 {
     _instance = this;
 }