From 099c3ba0964d3779c627ce945e147f967e7f9d3d Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 11 Sep 2025 01:57:33 +0200 Subject: [PATCH] [glfw] Switch to loader scale --- spine-glfw/example/physics.cpp | 3 +-- .../SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-glfw/example/physics.cpp b/spine-glfw/example/physics.cpp index b6521b6b6..78c57fd81 100644 --- a/spine-glfw/example/physics.cpp +++ b/spine-glfw/example/physics.cpp @@ -104,12 +104,11 @@ int main() { GlTextureLoader textureLoader; Atlas *atlas = new Atlas("data/celestial-circus-pma.atlas", &textureLoader); SkeletonBinary binary(*atlas); + binary.setScale(0.2f); SkeletonData *skeletonData = binary.readSkeletonDataFile("data/celestial-circus-pro.skel"); // Create a skeleton from the data Skeleton skeleton(*skeletonData); - skeleton.setScaleX(0.2); - skeleton.setScaleY(0.2); skeleton.setupPose(); skeleton.update(0); skeleton.updateWorldTransform(Physics_Update); diff --git a/spine-ue/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp b/spine-ue/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp index 90d8c9ef4..f633f3b82 100644 --- a/spine-ue/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp +++ b/spine-ue/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp @@ -205,6 +205,7 @@ void USpineSkeletonAnimationComponent::SetPlaybackTime(float InPlaybackTime, boo if (bCallDelegates) { BeforeUpdateWorldTransform.Broadcast(this); } + skeleton->update(physicsTimeScale * DeltaTime); skeleton->updateWorldTransform(Physics_Update); if (bCallDelegates) { AfterUpdateWorldTransform.Broadcast(this);