Push fix of script
This commit is contained in:
parent
a90b9d97e4
commit
a9ed3bdc85
@ -193,7 +193,7 @@ public class PlayerController : MonoBehaviour
|
|||||||
switch (platform.type)
|
switch (platform.type)
|
||||||
{
|
{
|
||||||
case PlatformManager.PlatformType.Push:
|
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;
|
break;
|
||||||
case PlatformManager.PlatformType.Pull:
|
case PlatformManager.PlatformType.Pull:
|
||||||
rb.AddForce((other.transform.position - transform.position) * step, ForceMode.Force);
|
rb.AddForce((other.transform.position - transform.position) * step, ForceMode.Force);
|
||||||
|
Loading…
Reference in New Issue
Block a user