synctransform will now uselocaltransform only when checked

upm
kjjohnsen 2022-12-06 16:59:56 -05:00
parent 33780bb8de
commit b5a478696a
2 changed files with 11 additions and 3 deletions

View File

@ -46,9 +46,17 @@ namespace VelNet
/// This gets called at serializationRateHz when the object is locally owned
/// </summary>
protected override void SendState(BinaryWriter writer)
{
if (useLocalTransform)
{
if (position) writer.Write(transform.localPosition);
if (rotation) writer.Write(transform.localRotation);
}
else
{
if (position) writer.Write(transform.position);
if (rotation) writer.Write(transform.rotation);
}
if (scale) writer.Write(transform.localScale);
}

View File

@ -1,7 +1,7 @@
{
"name": "edu.uga.engr.vel.velnet",
"displayName": "VelNet",
"version": "1.1.3",
"version": "1.1.4",
"unity": "2019.1",
"description": "A custom networking library for Unity.",
"keywords": [