I’m trying to create a new multiplayer-friendly custom movement mode for climbing on ledges. I got this to work by changing the movement mode to MOVE_Flying and using multicast functions to begin the new mode, but I ran into issues with multiplayer – simulated clients with net lag would not know to start the ledge getup animation, jitters/lag, etc.
I figured the appropriate way to begin to solve this would be to add a custom movement mode and remove the multicast bits, but I’m having a lot of trouble. It works on the authority if I don’t run a dedicated server, but on any Simulated proxy or Autonomous proxy (when using dedicated server), the custom movement mode is being “corrected” to MOVE_Falling a frame after calling SetMovementMode(MOVE_Custom, LedgeMode). So on the autonomous proxy, it’s only in my ledge mode for one frame, and the simulated proxies are always in MOVE_Falling.
The change to falling is done in CharacterMovementComponent::ApplyNetworkMovementMode.
Things I’ve tried:
-
Multicast and server functions to change character state (doesn’t work well with lag)
-
disabling gravity, setting gravity scale to 0
-
set move mode to MOVE_Flying (feels hacky and inconvenient, is still changed to MOVE_Falling when networking (So I guess my problem isn’t just with custom movement modes))
Things I figure I should avoid:
-
Multicast and server RPCs (don’t work well with responsive character movement with net lag)
-
Changing source code (I am building from source but there’s got to be a better way)
-
brute force changing my movement state every frame or something (wouldn’t work well with simulated proxies)
This is my first time starting a networked game from scratch, so if I’ve said anything dumb please correct me