add TODO and warning

This commit is contained in:
Mister_Nebula 2021-05-26 20:42:47 +01:00
parent b58d5a0b9c
commit 7ff4eb06f3

View File

@ -210,11 +210,13 @@ namespace QSB.Syncs.TransformSync
_intermediaryTransform.SetReferenceTransform(transform);
}
// TODO : remove .Distance
private Vector3 SmartSmoothDamp(Vector3 currentPosition, Vector3 targetPosition)
{
var distance = Vector3.Distance(currentPosition, targetPosition);
if (distance > _previousDistance + DistanceLeeway)
{
DebugLog.DebugWrite($"Warning - {AttachedObject.name} moved too far!", MessageType.Warning);
_previousDistance = distance;
return targetPosition;
}