The hollow Cylinder cann't work

mybios

12-09-2006 04:06:08

I make a hollow Cylinder and six boxs in 3dsmax and export them with Ofusion.

but not working in my game.the box will ouside hollow Cylinder .the box always can't go in the hollow Cylinder.the hollow Cylinder looks like a solid Cylinder . i press F3 checking the lines .i see that hollow Cylinder become a solid Cylinder ....
look at my code:

OgreNewt::Body *DiceState::CreateBody(const String &strName , bool bStandardForceCallback , Real fMass , const Vector3 &inertia)
{
SceneNode *pObjNode = mSceneMgr->getSceneNode(strName);
mSceneMgr->getEntity(strName)->setNormaliseNormals(true);

OgreNewt::Body* bodDotScen;
if(bStandardForceCallback)
{
bodDotScen = new OgreNewt::Body( m_World, &OgreNewt::CollisionPrimitives::ConvexHull(
m_World , pObjNode) );
bodDotScen->setMassMatrix(fMass , inertia);
bodDotScen->setStandardForceCallback();
}
else
{
bodDotScen = new OgreNewt::Body( m_World, &OgreNewt::CollisionPrimitives::TreeCollision(
m_World , pObjNode , true) );
}
bodDotScen->attachToNode( pObjNode );
bodDotScen->setPositionOrientation(pObjNode->getPosition(), pObjNode->getOrientation());
return bodDotScen;
}

void DiceState::CreateScene()
{
// loading scene(load all mess)
OSMScene* scene = gRoot.LoadScene("Dice.OSM" , true , gGame.mSceneMgr);


// create the floor to newton
CreateBody("Plane01" , false);

// create the hollow Cylinder to newton
m_bodyGrass = CreateBody("Grass"
, true
, 100
, OgreNewt::MomentOfInertia::CalcCylinderHollow(100 , 1 , 81.72)
);
mPos.y = -9.8;

// set grass callback to newton
m_bodyGrass->setCustomForceAndTorqueCallback<DiceState>( &DiceState::GrassForceCallback , this);

// create boxs to newton
for(int i = 1 ; i <= 6 ; i ++)
{
CreateBody("Dice0" + Ogre::StringConverter::toString(i)
, true
, 3
, OgreNewt::MomentOfInertia::CalcBoxSolid(1 , Vector3(3 , 8 , 8))
);
}
}

mybios

12-09-2006 10:00:25

I post the screen.

mybios

12-09-2006 10:03:59

When I use TreeCollision it looks ok. But the grass can't move...