Network Smooth For Complex Movement

I’m making my own custom air control that I’d like to feel as smooth as Unreal’s Native movement.

During my research I’ve come across some helpful info like this tutorial here. However, I think the scope of what I’m trying to do is bit beyond the guides from Unreal as suggested in approach 4 here. Using the suggestions I’ve managed to get one of my movement codes to feel quite smooth client side even with 500ms latency and 15% packet loss. This movement code is a simple trigger to cause a leap effect so it isn’t anything complicated. The tutorial I linked covered how to make a custom Movement Component to handle such custom movement.

Where I’m lost is I can’t see any guides to help explain smoothing for complex movement. Movement that would edit the players velocity every frame for example. I have a custom AirMove that adjusts how a player can move in the air and this changes the players velocity every frame. With the same testing conditions its really skippy and does not feel smooth client side. Right now as I understand I should be able to use Unreal’s native net optimizations to my benefit some how but I’m not sure what the best of doing this is.

Currently I’ve followed the scope of the tutorial in an attempt but this does not help. Here is my code so far.

Again AirMove does the Calculations to edit the players velocity.

Any suggestions or resources would be appreciated.

You could do the camera position calculations client side, and verify via server positions that the camera is within range of expected position, and lerp back to server position.

Or take an Overwatch approach, and calculate whole player data client-side, and verify it server-side to prevent cheating.

The latter I tried, if by that you mean have both client and server do the calculations with server ultimately deciding the position. The former is what the Unreal native net code is doing (to some extent, they do a few other things as well). My goal here it to work with the existing Unreal Net Framework provided by their CharacterMovementComponent. Since I’ve made a class that inherits from their CharacterMovementComponent I can override methods as needed.

The correct way to handle custom movement modes is to use the approach in your first link. I have used that approach to create a custom climbing mode with client side prediction and it queues the moves so that network replay can function properly. I admit the examples in that link are a bit simple, but you can expand upon that method to create any level of movement complexity that you need. You just need to think of your movement in terms of moves that can be queued (input events) instead of thinking of the end result of that movement (velocity).

I would also take a look at the source code to the Character Movement Component on GitHub as it has a lot of useful code you can copy and rework to match your custom flying movement mode.