mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-19 03:39:50 +00:00
SetReferenceTransform: also set transform.position/rotation
This commit is contained in:
parent
4ce58220b1
commit
4ef9254817
@ -287,19 +287,19 @@ public abstract class SyncBase : QSBNetworkTransform
|
|||||||
|
|
||||||
ReferenceTransform = referenceTransform;
|
ReferenceTransform = referenceTransform;
|
||||||
|
|
||||||
if (!hasAuthority && UseInterpolation && AttachedTransform)
|
if (!hasAuthority && AttachedTransform)
|
||||||
{
|
{
|
||||||
if (IsPlayerObject)
|
if (IsPlayerObject)
|
||||||
{
|
{
|
||||||
AttachedTransform.parent = ReferenceTransform;
|
AttachedTransform.parent = ReferenceTransform;
|
||||||
AttachedTransform.localScale = Vector3.one;
|
AttachedTransform.localScale = Vector3.one;
|
||||||
// SmoothPosition = AttachedTransform.localPosition;
|
transform.position = SmoothPosition = AttachedTransform.localPosition;
|
||||||
// SmoothRotation = AttachedTransform.localRotation;
|
transform.rotation = SmoothRotation = AttachedTransform.localRotation;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// SmoothPosition = ReferenceTransform.ToRelPos(AttachedTransform.position);
|
transform.position = SmoothPosition = ReferenceTransform.ToRelPos(AttachedTransform.position);
|
||||||
// SmoothRotation = ReferenceTransform.ToRelRot(AttachedTransform.rotation);
|
transform.rotation = SmoothRotation = ReferenceTransform.ToRelRot(AttachedTransform.rotation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user