blueprint

Bug Fix for CMC Swimming in Multiplayer

  • Exposure: public
  • UE Version: 5.2

AdventureAcademy

May 5, 2024, 6:53 pm

This fixes the bug that happens when a player leaves the water volume and for some reason all of the other actors are put into the falling state.

Added update that makes the issue unnoticeable. Checking the movement mode in OnMovementModeChanged and setting it back to swimming causes a very small bob in the water. This is about as good as it gets without fixing the root cause.

Why does it happen? IDK

Suspicions: The Water Body Objects do not have a physics volume We hack around that by setting our capsule component's physics volume Water Volume flag to true. I think the CMC reuses one physics volume for every character line 4277 requires a physics volume to continue swimming If its reusing the volume, one character exiting the water causes all characters to exit the water.

Click the button above, it will automatically copy blueprint in your clipboard. Then in Unreal Engine blueprint editor, paste it with ctrl + v
Versions
May 5, 2024
  1. Setting Swim volume was not fast enough.
    Also added event handler to reset movement mode if my actor thinks its should still be swimming and its movement mode is not set to swimming.

    The issue is now unnoticeable and looks like a natural bob in the water.

  2. First commit

    See