Sliding

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
tadmiral
Posts: 9
Joined: Thu Oct 07, 2010 10:06 am

Sliding

Post 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.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Sliding

Post 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.
Post Reply