コード例 #1
0
    private void Update()
    {
        if (!m_isSnapping)
        {
            return;
        }

        Vector3 snapPos = m_gridSnapManager.GetSnapPos(transform.position, m_isXLocked, m_isYLocked, m_isZLocked);

        m_snappingObject.transform.position = snapPos;
    }
コード例 #2
0
    private void Update()
    {
        if (!m_isSnapping)
        {
            return;
        }

        Vector3 snapPos = m_gridSnapManager.GetSnapPos(transform.position);

        m_snappingObject.transform.position = snapPos;
        m_snappingObject.transform.rotation = Quaternion.identity;
    }