bravery
26-05-2006 07:06:03
my object (ball) is always fall from the level the following image will show you what I mean:

the ball start in the top of the land and then fall throu the land.
here is how I create the physics for both the ball and land:
so what to do? can anyone suggest any help?
the ball start in the top of the land and then fall throu the land.
here is how I create the physics for both the ball and land:
SceneNode* mMBallNode = mSceneMgr->getSceneNode("L1T1MBall");
SceneNode* mLevelNode = mSceneMgr->getSceneNode("L1T1Level");
OgreNewt::Collision* MBall_col = new OgreNewt::CollisionPrimitives::ConvexHull(m_World, mMBallNode);
OgreNewt::Collision* mLevel_col = new OgreNewt::CollisionPrimitives::TreeCollision(m_World, mLevelNode, true);
OgreNewt::Body* MBall_body = new OgreNewt::Body( m_World, MBall_col );
OgreNewt::Body* mLevel_body = new OgreNewt::Body(m_World, mLevel_col);
delete MBall_col;
delete mLevel_col;
Ogre::Vector3 inertia = OgreNewt::MomentOfInertia::CalcSphereSolid( 10.0, 1.0 );
MBall_body->setMassMatrix( 10.0, inertia );
MBall_body->attachToNode( mMBallNode );
mLevel_body->attachToNode(mLevelNode);
MBall_body->setStandardForceCallback();
mLevel_body->setStandardForceCallback();
so what to do? can anyone suggest any help?