Page 1 of 1

Sliding

Posted: Thu Feb 09, 2012 1:53 am
by tadmiral
Is it possible to have the simple character controller move at a set speed rather than accelerating and decelerating? Be cause when i stop walking there is a small amount of slide as the character decelerates.

Re: Sliding

Posted: Thu Feb 09, 2012 2:34 am
by Norbo
All the character controllers have some type of acceleration control. In the SimpleCharacterController, it's the Acceleration, TractionDeceleration, and SlidingDeceleration properties. Acceleration is used when the character is trying to move. Traction deceleration is used to remove any velocity which violates the goal motion (which would be all motion, if the character's desired motion is zero). SlidingDeceleration acts similarly, but is used when the character is on a slope too steep to have traction on.

The more robust CharacterController and SphereCharacterController also both have HorizontalMotionConstraints with MaximumForce, MaximumSlidingForce, and MaximumAirForce properties which serve similar purposes.

All characters will accelerate up to the desired speed and not beyond it. So, if you want instantaneous starts and stops, you can set the acceleration/force properties to very high values.