Beispiel #1
0
 void Update()
 {
     if (showGizmo)
     {
         DebugUtility.DrawCrossMark(m_transform.TransformPoint(m_rigidbody.centerOfMass), m_transform, GColor.white);
     }
 }
    void ApplyForce()
    {
        Vector3 applicationPoint = m_rigidbody.transform.TransformPoint(forcePosition);

        DebugUtility.DrawCrossMark(applicationPoint, GColor.solidRed, 0.2f);
        Debug.DrawLine(applicationPoint, applicationPoint + forceVector / 1000);

        m_rigidbody.AddForceAtPosition(forceVector, applicationPoint);
    }
    void Update()
    {
        m_textStyle.font             = font;
        m_textStyle.fontSize         = fontSize;
        m_textStyle.normal.textColor = fontColor;

        m_smallTextStyle.font             = font;
        m_smallTextStyle.fontSize         = smallFontSize;
        m_smallTextStyle.normal.textColor = fontColor;

        m_inertiaHelper.DoUpdate(m_rigidbody);
        DebugUtility.DrawCrossMark(m_rigidbody.worldCenterOfMass, m_rigidbody.transform, GColor.accentPurple, 0.2f);

        Time.timeScale = timeScale;
    }