Apply friction to NxOgre::SceneGeometry

mamairaja

18-05-2010 17:31:31

Hello
I set friction to nxogre::Scene as following
mScene->getMaterial(0)->setStaticFriction(0.5);
mScene->getMaterial(0)->setDynamicFriction(0.5);

I am creating a scenegeometry using traingle mesh as following. It is a floor.
NxOgre::Mesh* floorNxs = NxOgre::MeshManager::getSingleton()->load("media:FLOOR.nxs");
NxOgre::TriangleGeometry* floorGeometry = new NxOgre::TriangleGeometry(floorNxs);
mScene->createSceneGeometry(floorGeometry , NxOgre::Matrix44(NxOgre::Vec3(*iterator)));


For this flour I need to apply a separate friction value. But I do not know how.
Please help me
Thank you

betajaen

18-05-2010 19:05:19

Basically in the mesh all the triangles have "0" as it's material identifier, you need to re-cook the mesh so they are all "1" or "2". Or what ever material you have for your floor.

This thread should help.