Skip to content

Instantly share code, notes, and snippets.

@viliamvolosv
viliamvolosv / QuaternionCompression.cs
Created January 25, 2022 07:54 — forked from lux/QuaternionCompression.cs
C# - Use "smallest three" compression for transmitting Quaternion rotations in Unity's UNET networking, from 16 bytes to 7 bytes.
// Copyright (c) 2016 StagPoint Software
namespace StagPoint.Networking
{
using System;
using UnityEngine;
using UnityEngine.Networking;
/// <summary>
/// Provides some commonly-used functions for transferring compressed data over the network using