Why does applying an impulse of -CurrentVelocity each tick not completely stop character movement?

I’m on a mission to understand how the CharacterMovement component works and I found this quirk which goes against what I assumed would happen. I’m trying to understand why applying a physics impulse which should completely negate character movement doesn’t. When I hold a movement key down, my character still moves (albeit very slowly) as if there is a small amount of velocity still remaining. Does anyone know why?
So far I have tried changing the tick group to all possible options, using substepping and adjusting the max physics delta time with no change in behavior.

The use case here is that I was trying to stop all movement in a given direction so that the player effectively hits an invisible barrier.

I’ve put this question in Blueprint Scripting though I’ve encountered the same thing using C++

I believe its because of the gravity, i uploaded a vid showing what i tried. Why does applying an impulse of CurrentVelocity each tick not completely stop character movement - YouTube

Thank you so much for your reply!! Though you do manage to stop all the velocity on the Z axis I think you will find that you can still slide your character around with the wasd keys, in theory this movement should also be stopped by the negative impulse. Applying this negative impulse should stop ALL movement including gravity, player movement and any physics objects hitting the player as well. But for some reason it doesn’t. I know from experiments in other game engines (Unity and Godot) that applying an impulse of -CurrentVelocity should stop all movement completely, It also works in Unreal using just a basic Actor, but as soon as you use a CharacterController component for movement it doesn’t work

interesting post! I’ve had a similar issue but with a slightly different application… using AddForce to keep my player Character from slipping sideways as it turns at speed in Flying movement mode. For my purposes, this works well… but it doesn’t exactly cancel the slippage.

As you likely, this could get complicated because of all the possible interactions :slight_smile: It’s VERY interesting that you mention it works exactly with an Actor, but not a Character. If you need it exactly, perhaps consider the interaction of:

  • Linear Damping
  • Character component Max Acceleration/Braking Friction/Mass/Gravity/Braking Sub Stepping Time/Braking Deceleration/Ground Friction
  • Physics volume fluid friction
  • How movement input is applied on Tick/Substepping for Characters