So I have a character in game. And it is walking with this code:
float y = Input.GetAxis("Vertical");
var v3 = tra.up * speed * y;
v3.y = rigi.velocity.y;
rigi.velocity = v3;
But it is not so realistic. Because when there is a heavy object on the ground and when the character walks through to heavy object it pushes the object and character don’t slow down.
So is there any code that make it more realistic?