Porting to Unreal 5.4 problem
Posted by admin on November 27, 2024Only High now moved to Unreal 5.4, and although it looked normal, something was odd. They changed the behavior of the character movement component.
Before, if your character jumped while standing on a moving platform, it could have the platform velocity and stay on the platform. But now, the character does not inherit velocity when jumping off of a moving platform. Now if you jump you stay in the place and the platform will go without you.
This is bad for Only High, there are many elements when you need to jump over obstacles right a moving project.
So how to fix it, if we look closely at the Character Movement Component, you can check this:

It will help to stay on the platform. But if you want to jump off the platform and keep that boost, many shortcuts in Only High are designed that way, then you need to look into C++.
You should have your own Character Movement Component, parent class UCharacterMovementComponent. You need to override a function UpdateBasedMovement.
First, look at the function in the parent class, the last part of the code is what we need to remove. So in your movement component h file add:
virtual void UpdateBasedMovement(float DeltaSeconds) override;
In the CPP file, you might need to add:
#include "Components/CapsuleComponent.h"
Add the UpdateBasedMovement function, copy code from the parent class, paste it here, and remove or comment out the last part. The part looks like this:
// Check if falling above current base
if (IsFalling() && bStayBasedInAir)
{
const FVector PawnLocation = UpdatedComponent->GetComponentLocation();
FFindFloorResult OutFloorResult;
ComputeFloorDist(PawnLocation, StayBasedInAirHeight, StayBasedInAirHeight, OutFloorResult, CharacterOwner->GetCapsuleComponent()->GetScaledCapsuleRadius(), NULL);
UPrimitiveComponent* HitComponent = OutFloorResult.HitResult.Component.Get();
if (!HitComponent || HitComponent->GetAttachmentRoot() != MovementBase->GetAttachmentRoot())
{
// New or no base under the character
ApplyImpartedMovementBaseVelocity();
SetBase(NULL);
return;
}
}
You might need to recompile the whole project after, even plugins. I had an "Unknown Error", when I recompiled everything it was ok.
Update 02/23/2025
Nothing really helps. Before UE5.4 you just had momentum of moving platform.
Now if you check "Stay based in the air" you just attached to the platform. If you jump off, you will end up with your own speed.
If you delete the c++ code I mention earlier, it would look like it worked, but in reality you are just attached to the platform until you land to another. So if the platform goes backward while you are in the air, it will drag you back. And one player landed on a rotating element, and was flying forever.
The workaround could be "Update Kinematic from Simulation" checked on server. Works better with "Interp to movement" than a timeline. But it is still unstable. On a fast moving up platform, the player would sink through the platform.
Update 03/09/2025
Here what I found:
In Unreal Engine 5.4, significant changes were introduced to the Character Movement Component, primarily through the integration of the Mover Plugin. This new system offers enhanced flexibility and customization for character movement, addressing limitations of the previous component.
Key Changes:
Introduction of Mover Plugin: The Mover Plugin replaces the traditional Character Movement Component, providing a more modular and customizable approach to character movement. This allows developers greater control over movement mechanics and simplifies the process of implementing complex behaviors.
Networking Enhancements: The new system improves replication and synchronization in multiplayer environments, making it easier to manage character movement across networked games.
Custom Gravity Support: UE 5.4 introduced support for custom gravity within the Character Movement Component, enabling developers to create unique gravitational effects, such as gravity puzzles or planet-like gravity systems.
UNREAL ENGINE FORUMS
Impact on Existing Projects:
Developers updating projects to UE 5.4 have reported changes in character behavior, particularly concerning velocity inheritance when jumping off moving platforms. Previously, characters would inherit the platform's velocity upon jumping; however, in UE 5.4, this behavior has been altered, leading to challenges in maintaining consistent movement mechanics.
UNREAL ENGINE FORUMS
Addressing the Changes:
To adapt to these changes, developers can:
Utilize the "Stay Based In Air" Option: This new setting allows characters to remain associated with their movement base while airborne, though it may require adjustments to prevent undesired movement replication.
Manually Update Component Velocity: Ensuring that a component's velocity is accurately updated can help maintain expected movement behaviors. Implementing custom solutions to track and apply base component velocity may be necessary.
Categories: Only High Unreal Engine Tags: game-dev · unreal-engine · only-high · indie · ue5.4