Exploring how to keep Character Movement from auto-switching to Walking Mode

I only found this after a week or so of aimless googling, finally asking the google AI and it giving me a plain answer. In the interest of having this be found somewhere not in the Sarlacc Pit oh human knowledge, I decided to copy what I found here.

My current use case is wanting to create a custom digging system at runtime using Dynamic Mesh Booleans. I’ll use “dig” to mean “boolean” here; I’m just subtracting a smaller shoveling mesh cutout from the larger digging area. I have the Default Movement Mode in Character Movement set to “Falling”, and I have the OnLanded event firing off a SetMovementMode node that resets it to Falling.

And yet, it keeps resetting to Walking when I land. This wouldn’t be a problem, except that in Walking Mode the character seems to have a magnetism to the ground directly beneath them. In effect, if I dig downward, I teleport to the new ground beneath me.

First discovery: Character Movement defaults MovementMode to Walking after the OnLanded event fires. Slap a Delay of 0.0 to set it after that default.

Here’s the second discovery: Character Movement does this default EVERY frame it detects walkable land beneath it. This is called foreshadowing, but I want to expound on what I did just in case it helps someone else.

There are two solutions to this:

  1. Change the OnLanded event to flip an OnGround boolean to True, and have a Tick branch on that boolean constantly set MovementMode to Falling if True. Or if you’re thinking to just be always falling, then do it on the tick regardless.

    This has the… comedic downside of having your character bounce on the ground, as constantly resetting to Falling appears to cause the character to lift off the ground.

  1. Set the ground component you’re looking to not-land on, to “Unwalkable.” And lo and behold, you can just do that. don’t do anything else, the previous stuff is (at least for my needs) unnecessary.

This has satisfied me. I no longer teleport when digging down, which gives me a great deal more control over my own movement. I hope this helps someone else on their dev journeys.