Character slides

Why is it that when my character is on even the slightest slope, he slides down it? Is there a way to make it so it doesn’t slide? or better yet, so that it doesn’t slide, UNTIL it reaches a certain angle?

I have a partial answer:

Theoretically, friction should achieve that for you.
There are 2 types of friction to consider here:
static (The force of friction acting against a force on stationary object)
kinetic (The force of friction acting against a force on object while object is moving)

Static friction is higher than kinetic friction; it is harder to move an object at rest than one in motion.

However, from what I can find, Blender (Bullet) only has kinetic friction?

Anyways, under material, turn on Physics. Turn friction to <number of choice>
You will notice that you object still slides slowly, it shouldn’t in theory, but it does.
To combat this, under object’s Physics, disable ‘No Sleeping’ (Enable object to sleep)
This forces the object to ‘sleep’ through tiny movement.

This method feels a little hacky, and I am curious if others have better alternatives.

Here is a small example:
friction test.blend (311 KB)

Use servo motion for controlling velocity. The servo motion actuator has 0 velocity as a valid target, and will apply a force to stop things moving. Simply make it so that when a keys aren’t pressed (eg the invert flag on a sensor), there is a servo actuator applying force to stop motion.

You can do it axis by axis as well, and that involves a big long chain of logic bricks.

In short:

  • Learn python, things are easy as you can control the servo motion actuator precisely, giving you fluid movement that behaves the way you would expect it.

I suppose I should have mentioned that I am using a character controller, not dynamic, or static, or rigidbody.

I fought with this some time ago also. For some reason Friction has no effect when using Character physics type. I gave up and changed to Dynamic type for my character, which is pity since I would have loved to use Character physics type.