How to reset movement mode to default?

Hi there!
I am using the ThirdPersonCharacter blueprint in my game.
Right now I’m working on a swimming/diving mechanic in blueprint in which I change the movement mode of the character to flying when it’s in the water (in order to disable gravity). The problem is that when the character gets out of the water I want the movement mode to return to the default one. I have tried all the different modes (none, walking, Navmesh walking, etc.) but none of them seem to function the same way as the default one.

How can I reset the movement mode back to default when my character gets out of the water?

Thank you in advance!

Try troubleshooting, use a key (say, X) and use that to set the movement mode, to which ever you want right at the start of the game, there is probably something you are overlooking, maybe setting if not to use gravity instead. Tell me how it goes.

Thank you for the quick reply!
My problem is not that I can’t change the movement mode, it’s just that I don’t know which movement mode is the default one, or how to go back to it after setting it to flying. Can you tell me how I can go back to the default one?

The idea here was to make sure that changing the movement mode is what is causing the problems.
But anyways, got home and it seems like there is a node called get default land movement mode, use that to set the new movement mode.

Using the “Default land movement” node does the same as just setting the movement mode to “Walking”. Apparently “Walking” isn’t the default movement mode.
However, I got around the problem using the enable/disable gravity node.
Now my only problem is that I can’t move the character in the Z axis when it’s not in the Flying mode. Do you know how I can get around this?

That’s weird, are you using rootmotion?

Try using AddRelativeLocation or AddForce then

I am using the “Add movement input” node with “self” as “target”.
I don’t know what root motion is?

They both act the same way as the add movement input node.
Maybe I need to change something in the movement mode to unlock the z axis?
Thank you for your continued help!

Hmm, maybe this will help you:

I tried following the instructions on the link you gave me, but the problem is still that it just can’t move along the z-axis unless the movement mode is set to flying. This leads me to believe that there must be something in the default movement mode that prevents it from moving along the z-axis. Do you know if this is true, and how to change it?

I had the same issue. I was setting the movement mode on tick event and having it switch between WALKING and FLYING. Problem was things like jumping automatically change the movement mode to FALLING and back to WALKING and since I was hard setting it to WALKING on every tick, the auto switch to FALLING was being overriden, hence the weird behaviour.

Also the default movement mode is WALKING. When you apply a jump it internally switches to FALLING and back to WALKING when the jump is over.

Yes, this was indeed my problem as well :slight_smile: