Skip to content
Snippets Groups Projects
Verified Commit bdc6b063 authored by Adrian Paschkowski's avatar Adrian Paschkowski :thinking:
Browse files

Small fix to interpolator logic and typo

parent 5ff756b5
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ public class BaseCameraController : MonoBehaviour
void Update()
{
if (Input.GetKeyDown(KeyCode.Z)) // TODO Remove evntually
if (Input.GetKeyDown(KeyCode.Z)) // TODO Remove eventually
{
var player = GameObject.FindGameObjectWithTag("Player");
AnimateToPosition(player.transform.position + new Vector3(0f, 0.75f), 1.5f, 0.1f);
......
......@@ -14,7 +14,7 @@ public class Interpolator
set
{
var newValue = Mathf.Clamp(value, minValue, maxValue);
if (!Mathf.Approximately(newValue, _targetValue))
if (!Mathf.Approximately(newValue, _targetValue) || !Mathf.Approximately(newValue, currentValue))
{
_targetValue = newValue;
running = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment