stupid crap

This commit is contained in:
Aleksander Waage 2020-08-14 19:27:27 +02:00
parent d236ae5b7f
commit 86412fbd82
3 changed files with 8 additions and 2 deletions

View File

@ -23,7 +23,7 @@ namespace QSB.Tools
private void Deactivate()
{
gameObject.SetActive(false);
//gameObject.SetActive(false);
}
}

View File

@ -36,7 +36,7 @@ namespace QSB.TransformSync
var transformSync = PlayerRegistry.GetTransformSync(message.SenderId);
DebugLog.ToScreen($"{transformSync.GetType().Name} of ID {message.SenderId} set to {message.SectorName}");
transformSync.ReferenceTransform = sector.transform;
transformSync.SetReference(sector.transform);
}
public override void OnReceiveLocal(SectorMessage message) => OnReceiveRemote(message);

View File

@ -101,5 +101,11 @@ namespace QSB.TransformSync
SyncedTransform.localRotation = QuaternionHelper.SmoothDamp(SyncedTransform.localRotation, transform.rotation, ref _rotationSmoothVelocity, Time.deltaTime);
}
public void SetReference(Transform sectorTransform)
{
ReferenceTransform = sectorTransform;
_positionSmoothVelocity = Vector3.zero;
_rotationSmoothVelocity = Quaternion.identity;
}
}
}