fix: Stairs jitter resolved
This commit is contained in:
@@ -257,8 +257,13 @@ public class SpiralStaircase : MonoBehaviour
|
|||||||
trigger.Triggered = false;
|
trigger.Triggered = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Vector3 targetPosition = new Vector3(0, _state.Progression * _settings.HalfTurns * -_stairHeight, 0);
|
||||||
|
Vector3 offset = targetPosition - _references.Stairs.transform.localPosition;
|
||||||
|
|
||||||
_references.Stairs.transform.localPosition = new Vector3(0, _state.Progression * _settings.HalfTurns * -_stairHeight, 0);
|
_references.Stairs.transform.localPosition = targetPosition;
|
||||||
|
|
||||||
|
if (OctoPlayer.Instance)
|
||||||
|
OctoPlayer.Instance.Move(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ManageInside()
|
private void ManageInside()
|
||||||
|
|||||||
@@ -187,6 +187,12 @@ namespace OctoCore.Components
|
|||||||
_references.Controller.enabled = true;
|
_references.Controller.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Move(Vector3 offset)
|
||||||
|
{
|
||||||
|
transform.position += offset;
|
||||||
|
Physics.SyncTransforms();
|
||||||
|
}
|
||||||
|
|
||||||
public void Pause(bool pause)
|
public void Pause(bool pause)
|
||||||
{
|
{
|
||||||
_state.IsPaused = pause;
|
_state.IsPaused = pause;
|
||||||
|
|||||||
Reference in New Issue
Block a user