diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index 63fa796..e892892 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -140,7 +140,7 @@ public class PlayerController : MonoBehaviour float step = platform.speed * Time.deltaTime * 10f; rb.AddForce((pullObject.transform.position - transform.position) * step, ForceMode.Force); } - if (Vector3.Distance(pullObject.transform.position, transform.position) > 10f) + if (Vector3.Distance(pullObject.transform.position, transform.position) > 5f) { pullObject = null; } @@ -154,7 +154,7 @@ public class PlayerController : MonoBehaviour float step = platform.speed * Time.deltaTime * 10f; rb.AddForce(-(pushObject.transform.position - transform.position) * step, ForceMode.Force); } - if (Vector3.Distance(pushObject.transform.position, transform.position) > 10f) + if (Vector3.Distance(pushObject.transform.position, transform.position) > 5f) { pushObject = null; }