How to make jumping?

z789017890

11-08-2010 08:11:05

i try to let the player jumping by PlayerControll

that my code


if (mKeyboard->isKeyDown(OIS::KC_H))
{
mCharBody->addImpulse(mCharBody->getOgreNode()->getOrientation()*Vector3(0,1, 0), mCharBody->getOgreNode()->getPosition());
}


When the player collision it can't jump
when it no collision it can jump

what's that happen?why?

please help me~~
thanks