Пример #1
0
    private void OnTranslationGizmoPostUpdateEnd(RTG.Gizmo gizmo)
    {
        if (m_selectedPoint == null)
        {
            return;
        }

        if (m_selectedPoint.CompareTag("KeyPoint"))
        {
            m_curveController.EditVecKey(m_selectedPoint, m_selectedPoint.transform.position);
        }
        else if (m_selectedPoint.CompareTag("ControlPoint"))
        {
            m_curveController.EditVecControlPoint(m_selectedPoint, m_selectedPoint.transform.position);
        }
    }
Пример #2
0
    public void EditVecKeyOrControlPoint()
    {
        if (!m_selectedPoint)
        {
            return;
        }
        float x = float.Parse(m_xposInputField.text);
        float y = float.Parse(m_yposInputField.text);
        float z = float.Parse(m_zposInputField.text);

        if (m_selectedPoint.CompareTag("KeyPoint"))
        {
            m_curveController.EditVecKey(m_selectedPoint, new Vector3(x, y, z));
        }
        else if (m_selectedPoint.CompareTag("ControlPoint"))
        {
            m_curveController.EditVecControlPoint(m_selectedPoint, new Vector3(x, y, z));
        }
    }