Beispiel #1
0
    public void OnLocalAvatarPacketRecorded(object sender, OvrAvatar.PacketEventArgs args)
    {
        var size = Oculus.Avatar.CAPI.ovrAvatarPacket_GetSize(args.Packet.ovrNativePacket);

        byte[] toSend = new byte[size];

        Oculus.Avatar.CAPI.ovrAvatarPacket_Write(args.Packet.ovrNativePacket, size, toSend);

        foreach (KeyValuePair <ulong, RemotePlayer> kvp in remoteUsers)
        {
            LogOutputLine("Sending Packet to  " + kvp.Key);
            p2pManager.SendAvatarUpdate(kvp.Key, this.transform, packetSequence, toSend);
        }

        packetSequence++;
    }