[ue] Port core changes.

This commit is contained in:
Mario Zechner 2024-04-03 15:27:06 +02:00
parent 26d403c9b7
commit 73a6a946f0
4 changed files with 14 additions and 12 deletions

View File

@ -55,11 +55,12 @@
#include <spine/EventData.h>
#include <spine/EventTimeline.h>
#include <spine/Extension.h>
#include <spine/HashMap.h>
#include <spine/HasRendererObject.h>
#include <spine/HashMap.h>
#include <spine/IkConstraint.h>
#include <spine/IkConstraintData.h>
#include <spine/IkConstraintTimeline.h>
#include <spine/Inherit.h>
#include <spine/InheritTimeline.h>
#include <spine/Json.h>
#include <spine/LinkedMesh.h>
@ -73,15 +74,17 @@
#include <spine/PathConstraintMixTimeline.h>
#include <spine/PathConstraintPositionTimeline.h>
#include <spine/PathConstraintSpacingTimeline.h>
#include <spine/PhysicsConstraintData.h>
#include <spine/Physics.h>
#include <spine/PhysicsConstraint.h>
#include <spine/PhysicsConstraintData.h>
#include <spine/PointAttachment.h>
#include <spine/Pool.h>
#include <spine/PositionMode.h>
#include <spine/Property.h>
#include <spine/RTTI.h>
#include <spine/RegionAttachment.h>
#include <spine/RotateMode.h>
#include <spine/RotateTimeline.h>
#include <spine/RTTI.h>
#include <spine/ScaleTimeline.h>
#include <spine/ShearTimeline.h>
#include <spine/Skeleton.h>
@ -98,11 +101,9 @@
#include <spine/SpineString.h>
#include <spine/TextureLoader.h>
#include <spine/Timeline.h>
#include <spine/Property.h>
#include <spine/TransformConstraint.h>
#include <spine/TransformConstraintData.h>
#include <spine/TransformConstraintTimeline.h>
#include <spine/Inherit.h>
#include <spine/TranslateTimeline.h>
#include <spine/Triangulator.h>
#include <spine/Updatable.h>

View File

@ -110,6 +110,7 @@ void USpineSkeletonAnimationComponent::InternalTick(float DeltaTime, bool CallDe
state->update(DeltaTime);
state->apply(*skeleton);
if (CallDelegates) BeforeUpdateWorldTransform.Broadcast(this);
skeleton->update(DeltaTime);
skeleton->updateWorldTransform();
if (CallDelegates) AfterUpdateWorldTransform.Broadcast(this);
}
@ -191,7 +192,7 @@ void USpineSkeletonAnimationComponent::SetPlaybackTime(float InPlaybackTime, boo
if (bCallDelegates) {
BeforeUpdateWorldTransform.Broadcast(this);
}
skeleton->updateWorldTransform();
skeleton->updateWorldTransform(Physics_Update);
if (bCallDelegates) {
AfterUpdateWorldTransform.Broadcast(this);
}

View File

@ -134,7 +134,7 @@ void USpineWidget::Tick(float DeltaTime, bool CallDelegates) {
state->update(DeltaTime);
state->apply(*skeleton);
if (CallDelegates) BeforeUpdateWorldTransform.Broadcast(this);
skeleton->updateWorldTransform();
skeleton->updateWorldTransform(Physics_Update);
if (CallDelegates) AfterUpdateWorldTransform.Broadcast(this);
}
}
@ -169,7 +169,7 @@ void USpineWidget::CheckState() {
state->setListener(callbackWidget);
trackEntries.Empty();
skeleton->setToSetupPose();
skeleton->updateWorldTransform();
skeleton->updateWorldTransform(Physics_Update);
slateWidget->SetData(this);
}
}
@ -270,10 +270,10 @@ bool USpineWidget::SetAttachment(const FString slotName, const FString attachmen
return false;
}
void USpineWidget::UpdateWorldTransform() {
void USpineWidget::UpdateWorldTransform(spine::Physics physics) {
CheckState();
if (skeleton) {
skeleton->updateWorldTransform();
skeleton->updateWorldTransform(physics);
}
}
@ -414,7 +414,7 @@ void USpineWidget::SetPlaybackTime(float InPlaybackTime, bool bCallDelegates) {
if (bCallDelegates) {
BeforeUpdateWorldTransform.Broadcast(this);
}
skeleton->updateWorldTransform();
skeleton->updateWorldTransform(Physics_Update);
if (bCallDelegates) {
AfterUpdateWorldTransform.Broadcast(this);
}

View File

@ -103,7 +103,7 @@ public:
bool SetAttachment(const FString slotName, const FString attachmentName);
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
void UpdateWorldTransform();
void UpdateWorldTransform(spine::Physics physics);
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
void SetToSetupPose();