Physics Character controller ice skating effect

Hello,
I’m playing around with the new Physics Controller. Here’s the playground from the official docs:
Character Controller Test PG | Babylon.js Playground

My question is, how to remove the ice-skating effect when moving around? By skating, I mean when you move and then stop pressing the input key (say W for moving forward), you continue to slide in the direction for another second. It’s as if every mesh you walk on is ice.

I’ll continue playing around with mass, friction, etc. and report back if I find anything. Thank you for your help.

cc @Cedric

check the line 180~184

1 Like

@11128 is correct.
Depending on parameters/states like the input, compute a different desiredVelocity and apply it.

Thanks @11128 , that’s pretty close to what I’m looking for. I wasn’t sure if that route was “acceptable” , or if it would be looked at as basically just working around the physics. I was tunnel visioned into thinking I needed to solve it purely with mass/friction settings or something of that nature.

1 Like