Regression No, according to affects versions 4.27 and 4.27.1
The restore process proceeds in the following order :
1. Remove spawnable actor in first cut (no effect because the actor is already removed )
2. Restore location of possessable actor
3. Remove spawnable actor in second cut (detaching from parent)
So after restoring the position, it will be further changed by detaching.
Destroying all spawnable actors before restoring possessable actor's location work around this issue.
The following code is a work around (but ugly).
void FPreAnimatedStateExtension::RestoreGlobalState(const FRestoreStateParams& Params) { ... // workaround begins : First, restore the states stored in FAnimTypePreAnimatedStateObjectStorage. (This will delete the spawned objects) for (int32 Index = 0; Index < GroupMetaData.GetMaxIndex(); ++Index) { if (!GroupMetaData.IsAllocated(Index)) { continue; } FPreAnimatedGroupMetaData& Group = GroupMetaData[Index]; for (int32 AggregateIndex = Group.AggregateMetaData.Num() - 1; AggregateIndex >= 0; --AggregateIndex) { FAggregatePreAnimatedStateMetaData& Aggregate = Group.AggregateMetaData[AggregateIndex]; if (Aggregate.NumContributors == 0 && (!Aggregate.TerminalInstanceHandle.IsValid() || Aggregate.TerminalInstanceHandle == Params.TerminalInstanceHandle)) { if(Aggregate.ValueHandle.TypeID.TypeID== FAnimTypePreAnimatedStateObjectStorage::StorageID.TypeID ) { TSharedPtr<IPreAnimatedStorage> Storage = GetStorageChecked(Aggregate.ValueHandle.TypeID); Storage->RestorePreAnimatedStateStorage(Aggregate.ValueHandle.StorageIndex, EPreAnimatedStorageRequirement::Persistent, EPreAnimatedStorageRequirement::None, Params); Group.AggregateMetaData.RemoveAt(AggregateIndex, 1, false); } } if (Group.AggregateMetaData.Num() == 0) { // Remove at will not re-allocate the array or shuffle items within the sparse array, so this is safe Group.GroupManagerPtr->OnGroupDestroyed(Index); GroupMetaData.RemoveAt(Index); } } } // workaround ends // Ensure that the entries are restored in strictly the reverse order they were cached in for (int32 Index = 0; Index < GroupMetaData.GetMaxIndex(); ++Index) { if (!GroupMetaData.IsAllocated(Index)) { continue; } FPreAnimatedGroupMetaData& Group = GroupMetaData[Index]; ... }
Result
The location of the ThirdPersonCharacter will be restored to a non-original point.
I am not able to find world outliner how to enable it?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
How to achieve HLSL Multiple Render Target in Material blueprints?
How does TextureRenderTarget2D get TArray<uint8> type data?
What property of the Slider is the image used when dragging?
What properties of the progress bar can be used for drag and drop highlighting?
How does UMG set overlapping layouts?
What method is used to fill polygonal regions when drawing spline mesh at run time?
Hey, why do i get this when i snap two similar meshes together?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-134758 in the post.
0 |
Component | UE - Anim - Sequencer |
---|---|
Affects Versions | 4.27, 4.27.1 |
Target Fix | 5.0 |
Created | Nov 12, 2021 |
---|---|
Resolved | Feb 24, 2022 |
Updated | Jan 26, 2023 |