A character standing in a base will match its velocity to the base's velocity. If that character jumps into another base its velocity will be added to the new base's velocity and the character will be thrown forwards.
The licensee provided a simple repro project where a character starts off standing on a base with another base in front, they both speed up and move at matching speeds, like a train. The character velocity matches the velocity of the back base, as expected, but once it jumps onto the front base its velocity is added by the velocity of the new base, effectively doubling the velocity and throwing the character forwards.
I was not able to pinpoint the exact origin of the issue but I suspect it's located around UCharacterMovementComponent::GetImpartedMovementBaseVelocity(). When setting bImpartBaseVelocityX, Y, and Z to false the issue disappears because we stop taking GetMovementBaseVelocity() into account. For this particular case the character's velocity is the same as the platform so there is no need to add the base's velocity to the new velocity.
If opening repro project, Play In Editor and once both platforms are at max speed try to jump from the back platform to the front platform.
Expected behavior: the character would land in the front platform and stay there
Actual behavior: once the character lands it is thrown forwards as its velocity is added by the new base velocity
To recreate the scene:
Create a platform BP from a stretched cube and animate it's movement as kinematic objects using their Tick function, make it move forward at constant velocity
Spawn 2 and offset them so there's a jumpable gap between, both should move at the same direction and velocity
Spawn a character in the back platform (can be from the Third Person Template project)
Play In Editor so that the Character is on top of the platform moving along with it
While both are at full speed, jump from the back to the front platform
Expected behavior: the character would land in the front platform and stay there
Actual behavior: once the character lands it is thrown forwards as its velocity is added by the new base velocity
Non-fatal, callstack included for reference of observed behavior:
> UnrealEditor-Engine.dll!MovementBaseUtility::GetMovementBaseTangentialVelocity(const UPrimitiveComponent * MovementBase, const FName BoneName, const UE::Math::TVector<double> & WorldLocation) Line 656 C++
UnrealEditor-Engine.dll!UCharacterMovementComponent::GetImpartedMovementBaseVelocity() Line 1162 C++
UnrealEditor-Engine.dll!UCharacterMovementComponent::ApplyImpartedMovementBaseVelocity() Line 2614 C++
UnrealEditor-Engine.dll!UCharacterMovementComponent::UpdateBasedMovement(float DeltaSeconds) Line 2575 C++
UnrealEditor-Engine.dll!UCharacterMovementComponent::MaybeUpdateBasedMovement(float DeltaSeconds) Line 2366 C++
UnrealEditor-Engine.dll!UCharacterMovementComponent::PerformMovement(float DeltaSeconds) Line 2708 C++
UnrealEditor-Engine.dll!UCharacterMovementComponent::ControlledCharacterMove(const UE::Math::TVector<double> & InputVector, float DeltaSeconds) Line 6243 C++
UnrealEditor-Engine.dll!UCharacterMovementComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) Line 1685 C++
[Inline Frame] UnrealEditor-Engine.dll!FActorComponentTickFunction::ExecuteTick::__l2::<lambda_1>::operator()(float) Line 1225 C++
[Inline Frame] UnrealEditor-Engine.dll!FActorComponentTickFunction::ExecuteTickHelper(UActorComponent *) Line 4726 C++
UnrealEditor-Engine.dll!FActorComponentTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FBaseGraphTask> & MyCompletionGraphEvent) Line 1223 C++
[Inline Frame] UnrealEditor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FBaseGraphTask> &) Line 306 C++
UnrealEditor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask() Line 634 C++
UnrealEditor-Core.dll!UE::Tasks::Private::FTaskBase::TryExecuteTask() Line 504 C++
[Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> &) Line 482 C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 779 C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 668 C++
[Inline Frame] UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) Line 1453 C++
UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete(const TArray<TRefCountPtr<FBaseGraphTask>,TSizedInlineAllocator<4,32,TSizedDefaultAllocator<32>>> & Tasks, ENamedThreads::Type CurrentThreadIfKnown) Line 1526 C++
UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 815 C++
UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1866 C++
UnrealEditor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 774 C++
UnrealEditor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1496 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2140 C++
UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 550 C++
UnrealEditor.exe!FEngineLoop::Tick() Line 5869 C++
[Inline Frame] UnrealEditor.exe!EngineTick() Line 69 C++
UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 188 C++
UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 266 C++
UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 317 C++
[External Code]
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-231490 in the post.
0 |
Component | UE - Gameplay - Player Movement |
---|---|
Affects Versions | 5.5 |
Target Fix | 5.6 |
Created | Nov 26, 2024 |
---|---|
Updated | Dec 6, 2024 |