Problem using OgreNewt(setStandardForceCallback())

Fred

01-12-2007 22:22:30

Hi there,

I've a problem using OgreNewt.
If I run my program, a typical Windows Error appears(Send error report).
After debugging I found out that the line
m_pBody->setStandardForceCallback();
makes trouble.

The program stop at line: BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS));

What have I done?
I created an OgreNewt World

m_pWorld = new OgreNewt::World();

I created an OgreNewt BasicFrameListener

m_pFrList = new OgreNewt::BasicFrameListener(m_pWindow, m_pSmgr, m_pWorld, 120);
m_pRoot->addFrameListener(m_pFrList);


I created a Rigid Body:

m_vScale = Ogre::Vector3( 1, 1, 1 );
m_pSceneNode->setScale( m_vScale );

// rigid body.
m_pCollision = new OgreNewt::CollisionPrimitives::Box( pWorld, m_vScale );
m_pBody = new OgreNewt::Body( pWorld, m_pCollision );
m_pBody->attachToNode(m_pSceneNode);

// initial position
m_pBody->setPositionOrientation( Ogre::Vector3(0,0,0),Ogre::Quaternion::IDENTITY );
delete m_pCollision;
Ogre::Real m_rMass = 10.0;
m_vInertia = OgreNewt::MomentOfInertia::CalcBoxSolid( m_rMass, m_vScale );
m_pBody->setMassMatrix( m_rMass, m_vInertia );
m_pBody->setStandardForceCallback();


But if I run this, I get that Error.
What's wrong? What I've forgotten?

Perhabs you are supposed to know that I don't use the standard Ogre ExampleFrameListener, but my "own" which is about like this: http://www.ogre3d.org/wiki/index.php/Pr ... putHandler

So long

Fred