Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine > SerializeFixedVector
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/NetSerialization.h |
Include | #include "Engine/NetSerialization.h" |
template<int32 MaxValue, uint32 NumBits>
bool SerializeFixedVector
(
FVector3f & Vector,
FArchive & Ar
)
Remarks
MaxValue is the max abs value to serialize. If abs value of any vector components exceeds this, the serialized value will be clamped. NumBits is the total number of bits to use - this includes the sign bit!
So passing in NumBits = 8, and MaxValue = 2^8, you will scale down to fit into 7 bits so you can leave 1 for the sign bit.