mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-14 15:40:20 +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;
|
||||
|
||||
if (!hasAuthority && UseInterpolation && AttachedTransform)
|
||||
if (!hasAuthority && AttachedTransform)
|
||||
{
|
||||
if (IsPlayerObject)
|
||||
{
|
||||
AttachedTransform.parent = ReferenceTransform;
|
||||
AttachedTransform.localScale = Vector3.one;
|
||||
// SmoothPosition = AttachedTransform.localPosition;
|
||||
// SmoothRotation = AttachedTransform.localRotation;
|
||||
transform.position = SmoothPosition = AttachedTransform.localPosition;
|
||||
transform.rotation = SmoothRotation = AttachedTransform.localRotation;
|
||||
}
|
||||
else
|
||||
{
|
||||
// SmoothPosition = ReferenceTransform.ToRelPos(AttachedTransform.position);
|
||||
// SmoothRotation = ReferenceTransform.ToRelRot(AttachedTransform.rotation);
|
||||
transform.position = SmoothPosition = ReferenceTransform.ToRelPos(AttachedTransform.position);
|
||||
transform.rotation = SmoothRotation = ReferenceTransform.ToRelRot(AttachedTransform.rotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user