I’m using a rigidbody for my player (so that they can fly). I’m experiencing issues with the player sliding uncontrollably down slopes (even mild ones).
I’ve tried switching to kinematic when the player is grounded but then the player no longer collides with the terrain…
The smooth capsule edges tend to lend themselves to some extreme sliding, it’s very true. I tend to do a movement script that sets x and z velocity to zero if there are no movement keys pressed.
damn, I thought that was going to work. This is really strange - even if I manually set the velocity to zero the player still very slowly slides down the hill!
I am digging this one up as I am experiencing a similar issue. Note my gravity is 1/6th of the earth, so its low gravity.
What I notice is that changing the friction values in the material has no effect on the appearance of friction on the rigidbodies collider which is a convex hull.
I have a lunar lander which lands on a landing pad. I want different material friction for the smooth landing pad surface and the terrain surface. The terrain material does not show any change in effect.
If you take a simple capsule collider + rigidbody, freeze all rotation axes, set useGravity = true,
then apply a PhysicMaterial with:
staticFriction = 1
dynamicFriction = 1
bounce = 0
frictionCombine = max
bounceCombine = max
Place said capsule on a rectangular cube sloped at almost any angle, then press play, you will see the capsule very slowly sliding down the hill. Gravity pulls it down. One would think that a friction of 1 (max) would mean total friction, but it doesn’t seem to work that way. Setting the rigidbody.velocity to Vector3.zero every frame would stop it, but it also introduces other problems.