mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-22 12:39:51 +00:00
SyncBase: use smaller values for interp stop check
This commit is contained in:
parent
e6946128ce
commit
fc1ff0210a
@ -8,8 +8,8 @@ namespace QSB.Syncs
|
||||
{
|
||||
protected override float SendInterval => 0.05f;
|
||||
|
||||
protected const float PositionChangeThreshold = 0.05f;
|
||||
protected const float RotationChangeThreshold = 0.05f;
|
||||
private const float PositionChangeThreshold = 0.05f;
|
||||
private const float RotationChangeThreshold = 0.05f;
|
||||
|
||||
private Vector3 _prevPosition;
|
||||
private Quaternion _prevRotation;
|
||||
|
@ -270,7 +270,7 @@ namespace QSB.Syncs
|
||||
var distance = Vector3.Distance(SmoothPosition, transform.position);
|
||||
var angle = Quaternion.Angle(SmoothRotation, transform.rotation);
|
||||
if (Mathf.Abs(distance - _prevDistance) > DistanceChangeThreshold ||
|
||||
distance < PositionChangeThreshold && angle < RotationChangeThreshold)
|
||||
distance < .001f && angle < .001f)
|
||||
{
|
||||
SmoothPosition = transform.position;
|
||||
SmoothRotation = transform.rotation;
|
||||
|
Loading…
x
Reference in New Issue
Block a user