limdor
06-03-2008 15:34:29
I try to create a sphere when I press the space key but a excepcion in NxOgre_d.dll is throwed.
I have attach this piece of code in createScene and it runs but when I put it in processUnbufferedKeyInput(const FrameEvent& evt) then don't work
Does anybody know why?
I have attach this piece of code in createScene and it runs but when I put it in processUnbufferedKeyInput(const FrameEvent& evt) then don't work
Does anybody know why?
if( mKeyboard->isKeyDown(KC_SPACE) && mTimeUntilNextToggle <= 0 )
{
NxOgre::Body * b;
SphereShape * s = new SphereShape(2);
b = mScene->createBody("sphere.2m.mesh", s, mCamera->getPosition(), "mass: 420");
//b->setLinearVelocity(mCamera->getDirection()*50);
mTimeUntilNextToggle = 2;
}