Download

Character Movement Component deactivation / reset

Hello

I have a standard character that moves around (using character movement component). I want to be able to freeze that character in place, stopping it’s movement (including falling) when event is fired. Another event should unfreeze that character and resume it’s movement (with previous velocity).

I can do that by deactivating and activating character movement component. It works exactly as I want it to, except for the following problem:

If I deactivate the component while the character is standing on a moving platform, when I activate it again, the character is teleported back onto that platform (even if it moved away). Relative location is maintained. This happens even if I manually change actors location after reactivating the component.

Is there a way to lose / turn off that behavior? Something like checking again whats under characters feet?

Thanks for help.

Instead of disabling the movement component, set the component’s Max Walk Speed variable to zero. This will stop you from moving and can be set back to default without consequence. You can also use the Max Walk Speed to increase speed when sprinting and such.

This is a nice, simple solution but wont work with jumping / falling.
When I unfreeze a character I want it to resume it’s previous movement. This includes movement in air.

You need to Set Movement Mode to walking to reset the movement after disabling, it works for me.