Hi, I'm using the character code below to create my rigidBody, and I notice in the character demo, the friction for the world and the character is never set. If I don't set the friction for my character, it slides infinitely in the direction I move. How could this be? If I do set the friction for the character, he stops somewhat accurately, but seems to have a really hard time walking up even the slightest slopes. Maybe someone can enlighten me?
hkpCharacterRigidBodyCinfo info; info.m_mass = 100.0f; info.m_shape = mStandShape; info.m_maxForce = 1000.0f; info.m_up.set( 0.0f, 1.0f, 0.0f ); info.m_position.set( 0.0f, 20.0f, 1.0f ); info.m_friction = (10.0f); info.m_maxSlope = mOptions.mMaxSlope; info.m_supportDistance = mOptions.mSupportDistance; info.m_hardSupportDistance = mOptions.mHardSupportDistance; info.m_allowedPenetrationDepth = mOptions.mAllowedPenetrationDepth; mCharRigidBody = new hkpCharacterRigidBody( info );
// Create the Character state machine and context
{
hkpCharacterState* state;
hkpCharacterStateManager* manager = new hkpCharacterStateManager();
state = new hkpCharacterStateOnGround();
hkpCharacterStateOnGround* myState = static_cast<hkpCharacterStateOnGround*>(state);
myState->setSpeed( 10.0f );
myState->setGain( 1.0f );
manager->registerState( state, HK_CHARACTER_ON_GROUND);
state->removeReference();
state = new hkpCharacterStateInAir();
manager->registerState( state, HK_CHARACTER_IN_AIR);
state->removeReference();
state = new hkpCharacterStateJumping();
manager->registerState( state, HK_CHARACTER_JUMPING);
state->removeReference();
state = new hkpCharacterStateClimbing();
manager->registerState( state, HK_CHARACTER_CLIMBING);
state->removeReference();
mCharContext = new hkpCharacterContext( manager, HK_CHARACTER_ON_GROUND );
manager->removeReference();
// Set character type
mCharContext->setCharacterType(hkpCharacterContext::HK_CHARACTER_RIGIDBODY);
}



