I’m using following snippet to stop player after moving in order to make my controls more responsive. Character is physics-controlled.
if ((Input.GetAxisRaw("Vertical")==0)&&(Input.GetAxisRaw("Horizontal")==0) && (isGrounded) && (jumping<1)){
GetComponent<Rigidbody>().velocity = Vector3.zero;
}
And it works good. Too good in fact - as a matter of fact, I still want it to have some inertia, but not too much, about 3-10 frames or so. And now: When I’m using physics alone, inertia is always too high, it takes SECONDS for character to stop, no matter what I try and when I’m using above snippet, it stops instantly which is what I don’t want either.