From cdbb2113ed316f9b42c5b796810dfc33910f4f64 Mon Sep 17 00:00:00 2001 From: kimura Date: Wed, 8 Sep 2021 12:33:19 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=8A=E5=AE=A2=E3=81=95=E3=82=93=E3=81=AE?= =?UTF-8?q?=E9=87=8D=E3=81=AA=E3=82=8A=E8=A7=A3=E6=B1=BA=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E3=82=92=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyGame/Scenes/marketing/Scripts/CustomerController.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerController.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerController.cs index 419829b0..3cb386ec 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerController.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/CustomerController.cs @@ -85,8 +85,11 @@ public class CustomerController : MonoBehaviour durationDelta = 0f; this.UpdateAsObservable().Subscribe(_ => { - transform.localPosition = Vector3.MoveTowards(transform.localPosition, wayPoint, speed * Time.deltaTime); - if (Vector3.Distance(transform.localPosition, wayPoint) < .01f) + var localPosition = transform.localPosition; + localPosition = Vector2.MoveTowards(localPosition, wayPoint, speed * Time.deltaTime); + localPosition = localPosition + Vector3.forward * (localPosition.y + Mathf.Abs(walkSideBottomPos)); + transform.localPosition = localPosition; + if (Vector2.Distance(localPosition, wayPoint) < .01f) { if (durationDelta < completedDuration) {