Contents
How to stop Rigidbody sliding?
Play around with its mass (try increasing it). Try increasing its linear dampening (which is called drag I think). Give it a physics materiel. Also set the friction combine parameter to use maximum.
What does linear drag do in unity?
Drag is the tendency of an object to slow down due to friction with the air or water that surrounds it. The linear drag applies to positional movement and is set up separately from the angular drag that affects rotational movement.
How can you add friction to an object?
Increase the area exposed to air. As noted above, fluids like water and air can generate friction as they move against solid objects. The friction force that an object experiences as it moves through a fluid is called drag (this is sometimes referred to as “air resistance”, “water resistance”, etc.)
How do I Stop my game character from sliding on?
I have recently added a rigidbody component and a box collider on the player character in order to get the character to ‘bump’ into walls and not simply walk through them like a ghost. This aspect is working, unfortunately the character keeps sliding on the ground.
What to do when your character is hit on the ground?
Your braking when ground is hit is wrong, you simply stop the vertical movement, but that is only how a ground hit works when the ground is flat. What you should do is to project moveDirection on the surface that is hit, that will give you the new moveDirection.
How to make your character slide down in Unity?
If your library has a function to project a vector on a plane or surface that is what you should use. If not you should subtract moveDirection ‘s projection on the surface’s normal from moveDirection itself.
How do I make my character slide down high angled?
I set a slope limit of 45°, which does not allow the character to walk up the mountains with higher degrees. But he can still jump them up. How do I manage to make him slide down again when he jumped at places with too high slope?