Edit little functions
This commit is contained in:
parent
a141a6b50a
commit
fde48cbda6
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user