02-02-2022 08:23 AM
I was able to successfully use the ApplyStreamData(bytes []) method locally to transfer body and lipsync tracking data from one avatar to another. Thererfore I thought it would be simple to repeat this process using Photon as a means to transfer the data to an avatar remotely. For some reason it's not working. I've followed the data being received and passed through ApplyStreamData(bytes []). After that all the right functions within the SDK seem to be getting called and I get no errors. However, the arms and lips of my avatar are still not moving! Has anyone else ran into this problem? For context I'm testing with an Oculus Quest 2 and the UnityEditor. Here is the receiving side of my code for reference:
List<byte[]> m_streamedDataList = new List<byte[]>();
//Tracking Data bytes are recieved here
[PunRPC]
public void RecieveStreamData(byte [] bytes)
{
m_streamedDataList.Add(bytes);
}
//Runs through data list every frame applying streamed data
private void Update()
{
if (m_streamedDataList.Count > 0)
{
if (IsLocal == false)
{
byte[] firstBytesInList = m_streamedDataList[0];
if (firstBytesInList != null)
{
ApplyStreamData(firstBytesInList);
}
m_streamedDataList.RemoveAt(0);
}
}
}