From a7efee6ce74942e222013675017969933fa3bc0e Mon Sep 17 00:00:00 2001 From: bofeng-song Date: Thu, 22 Feb 2024 13:41:15 +0800 Subject: [PATCH] Fix the playback speed issue caused by multiple timeScale multiplications in Spine. (#16745) * Fix the playback speed issue caused by multiple timeScale multiplications in Spine. --- cocos/spine/skeleton.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index 6ba8db7684..fbf83f6c3a 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -1038,8 +1038,9 @@ export class Skeleton extends UIRenderer { this.markForUpdateRenderData(); if (EDITOR_NOT_IN_PREVIEW) return; if (this.paused) return; - dt *= this._timeScale * timeScale; if (this.isAnimationCached()) { + // On realTime mode, dt is multiplied at native side. + dt *= this._timeScale * timeScale; if (this._isAniComplete) { if (this._animationQueue.length === 0 && !this._headAniInfo) { const frameCache = this._animCache;