Push fix of script

This commit is contained in:
haitem 2022-01-30 12:19:35 +01:00
parent a90b9d97e4
commit a9ed3bdc85

View File

@ -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);