示例#1
0
    public void ReceivedMDTTPackage(MQTT_UserPackageReceived package)
    {
        if (package.m_userDeviceId == linkedUserId)
        {
            if (package.GetTimeWhenSendAsTimestamp() >= m_last.GetTimeWhenSendAsTimestamp())
            {
                m_last    = package;
                m_latency = m_last.GetLatency();


                m_lastBodyPosition = OVRCompressedInfo.TryParse(package.m_message);
            }
        }
    }
示例#2
0
    public static OVRCompressedInfo TryParse(string compressed)
    {
        OVRCompressedInfo comp = null;

        try
        {
            comp = new OVRCompressedInfo();
            comp.SetWithCompressed(compressed);
        }
        catch (Exception e) {
            Debug.Log("Parse fail:" + e.Message);
        }
        return(comp);
    }
示例#3
0
    void SetWith(OVRCompressedInfo value)
    {
        if (value == null)
        {
            return;
        }
        Lerp(m_headWithLerp, value.h);
        Lerp(m_leftHandWithLerp, value.l);
        Lerp(m_rightHandWithLerp, value.r);

        m_head.transform.position = value.h.GetPosition();
        m_head.transform.rotation = value.h.GetRotation();

        m_leftHand.transform.position = value.l.GetPosition();
        m_leftHand.transform.rotation = value.l.GetRotation();

        m_rightHand.transform.position = value.r.GetPosition();
        m_rightHand.transform.rotation = value.r.GetRotation();
    }