From a60d438d0043995d1a39c40da4ccd1540564e84c Mon Sep 17 00:00:00 2001 From: dgflash Date: Sat, 26 Nov 2022 21:18:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96MoveTo=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=9C=89=E7=95=A5=E5=BE=AE=E5=81=8F=E7=A7=BB?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/libs/animator-move/MoveTo.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/libs/animator-move/MoveTo.ts b/assets/libs/animator-move/MoveTo.ts index fb7f1f6..8f5ed50 100644 --- a/assets/libs/animator-move/MoveTo.ts +++ b/assets/libs/animator-move/MoveTo.ts @@ -93,6 +93,10 @@ export class MoveTo extends Component { // 移动完成事件 if (this.timer.update(dt)) { + if (this.ns == Node.NodeSpace.WORLD) + this.node.worldPosition = this.end; + else + this.node.position = this.end; this.exit(); } }