klarax
19-11-2009 02:26:19
Hi,
I have just setup things in my demo and the convex meshes are moving through the triangle geometry:
The code im using is:
The convex meshes interact with one and other, but not the triangle geometry.
I have also tried removing the scale in the triangle geometry and making it bigger inside 3d max, but still same thing happens.
Any ideas? It driving me crazy
Klarax
The only thing i can think of is that the
I have just setup things in my demo and the convex meshes are moving through the triangle geometry:
The code im using is:
//Setup Meshes
m_pBallsRoomMesh = NxOgre::MeshManager::getSingleton()->load("media:ballsroom.nxs");
m_pBallRoomGeometry = new NxOgre::TriangleGeometry(m_pBallsRoomMesh);
m_pScene->createSceneGeometry(m_pBallRoomGeometry, NxOgre::Matrix44(NxOgre::Vec3(0, 5, 0)));
m_pRoom = m_pSceneManager->createEntity("ballsRoom", "ballsroom.mesh");
m_pRoom->setMaterialName("ballsRoom");
m_pRoom->setQueryFlags(CANT_BE_CLICKED); // set flag to "not clickable"
m_pRoomNode = m_pSceneManager->getRootSceneNode()->createChildSceneNode("ballsRoomNode");
m_pRoomNode->attachObject(m_pRoom);
m_pRoomNode->setScale(Ogre::Vector3(2.0, 2.0, 2.0)); // scale the node and thus, the room mesh
m_pRoomNode->setPosition(Ogre::Vector3(820.0, -120.0, 270.0));
convexMesh = NxOgre::MeshManager::getSingleton()->load("media:target.nxs");
convex = new NxOgre::Convex(convexMesh);
int targetMovement = 0;
for(int i = 0 ; i < 7 ; i++)
{
m_pTargetBody[i] = m_pRenderSystem->createBody(convex, NxOgre::Vec3((900.0f - targetMovement), 0.0f, 270.0f), "target.mesh");
m_pTargetBody[i]->getEntity()->setMaterialName("target");
m_pTargetBody[i]->setGlobalOrientation(NxOgre::Matrix33(NxOgre::Real4(0, 5, 0, 0)));
targetMovement += 10;
}
The convex meshes interact with one and other, but not the triangle geometry.
I have also tried removing the scale in the triangle geometry and making it bigger inside 3d max, but still same thing happens.
Any ideas? It driving me crazy
Klarax
The only thing i can think of is that the