Swimming movement trouble

I have managed to get character swimming to work as intended. I created physics volume as water volume, added use controller pitch to be able to swim up, set “can swim” to true. Controller pitch breaks regular walking mode(player can’t walk when looking on the floor). Settings for getting out of the water are sort of working, but they are very jittery and it’s hard to get out of the water as you except in other games.

I can live with these problems, but I want the ability to be able to change character movement mode without the use of physics volume. There is no physics volume component in actor blueprint and I tried to cast to character the message to change movement mode to swimming on collision overlap with my custom volume. That worked for only a single frame and did not change anything. Then I tried to cast to character every frame and that indeed turned on the swimming movement mode, but that mode appears to be broken when activated that way. Probably every frame somewhere in C++ OnMovementModeUpdate is executed triggering only initial part of swimming movement mode. That behavior results in a broken movement mode very different from the intended one with a physics volume.

Can I use a character swimming without physics volume? Why swimming mode is not working as intended out of the box? If there is no way to enable it correctly, I will probably try using flying movement for swimming, but that seems like a bad workaround of some inconsistency or error in character controller.

This is a solution!

5 Likes

Hi, I’ve been struggling with an issue for days and I’m about done with it. If I can’t get it to work I’m just going to fake it with flying movement.

My question is, for some reason when I have a server character and a client character in a water volume, if I turn off “character movement > GetPhysicsVolume > Water Volume” it does it for both players. It’s so frustrating.

I have a spell in my game that allows a player to basically walk on the floor while in water, it turns off their water volume, and sets their movement mode to walking. I’ve tried almost everything, and it finally works per player and replicates, but now anytime one players water volume is turned off in the water, it affects all other players in that water.

Any solutions?

1 Like

Thank you so much for the solution!

Years have passed and I got the exact same issue and really don’t know why, if instead of just setting MovementMode to Swimming I put mode flying it works just fine. Something is wrong with swimming that affects both players.

I was struggling with this tonight and figured out the problem.
When you reference the Physics Volume through the Character Movement Component you are referencing whatever physics volume the character is in. If you have not placed a physics volume in the level you will be referencing the default volume that encompasses the entire level!

Honestly using physics volumes for character movement is just silly.

You can hit a water volume where there is no actual water or worse, on a shoreline where the water is too short to enter any swimming state.

It wasnt a good way to do things years ago.
Its not a good way to do things now.
It will never be a good way to ever do things ever…

spent hours to resolve this, same problem (((

Change movement mode from swim to fly, and disable gravity for all character components, in this case don’t need to use water volume

Work in single player, but in multiplayer is a problem ((
This is solution that I use!