public static void Write(this PacketBuilder builder, Vector3 vector) { builder.Write(vector.X); builder.Write(vector.Y); builder.Write(vector.Z); }
public static void WriteVector3WithZAsFloat(this PacketBuilder builder, Vector3 vector, int integerBits = 14, int fractionalBits = 10) { builder.WriteFloat(vector.X, integerBits, fractionalBits); builder.WriteFloat(vector.Y, integerBits, fractionalBits); builder.Write(vector.Z); }
public static void WriteVectorAsUshorts(this PacketBuilder builder, Vector3 vector) { builder.Write((ushort)(vector.X * (65536 / 360f))); builder.Write((ushort)(vector.Y * (65536 / 360f))); builder.Write((ushort)(vector.Z * (65536 / 360f))); }
public static void Write(this PacketBuilder builder, Vector3 vector, int integerBits, int fractionalBits) { builder.WriteFloat(vector.X, integerBits, fractionalBits); builder.WriteFloat(vector.Y, integerBits, fractionalBits); builder.WriteFloat(vector.Z, integerBits, fractionalBits); }