diff --git a/App/Assets/Scripts/Pion.cs b/App/Assets/Scripts/Pion.cs index bad980bb47d19660a371a72ab749d0d7a0c9c29f..74065f2457f8125bab76bb3f3b388162073a9892 100644 --- a/App/Assets/Scripts/Pion.cs +++ b/App/Assets/Scripts/Pion.cs @@ -66,7 +66,7 @@ public class Pion : MonoBehaviour { //methode gliseé le pion ver sa origine Transform _trans = c_o.get_posotion(); - while (transform.position != _trans.position) + while (transform.position.y != _trans.position.y && transform.position.x != _trans.position.x) { Vector3 targetPosition = new Vector3(_trans.position.x, _trans.position.y, -0.3f); transform.position = Vector3.MoveTowards(transform.position, targetPosition, moveSpeed * Time.deltaTime);