diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index fe4f602..95a44c9 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -193,7 +193,7 @@ public class PlayerController : MonoBehaviour switch (platform.type) { case PlatformManager.PlatformType.Push: - rb.AddForce(-(pushObject.transform.position - transform.position) * step, ForceMode.Force); + rb.AddForce(-(other.transform.position - transform.position) * step, ForceMode.Force); break; case PlatformManager.PlatformType.Pull: rb.AddForce((other.transform.position - transform.position) * step, ForceMode.Force);