just wandering
Ive created a sphere node and have animated water in an animated mesh
just want to know if i can apply the animated mech to the sphere
"scene::ISceneNode * node = smgr->addSphereSceneNode();
if (node)
{
node->setScale(core::vector3df(20.f,20.f,20.f));
node->setPosition(core::vector3df(0,0,30));
node->setMaterialTexture(0, driver->getTexture("../../media/water.jpg"));
node->setMaterialFlag(video::EMF_LIGHTING,false);
//Create mesh to add water effect to
//camera->setPosition(core::vector3df(140.f, 120.f, 5.f));
IAnimatedMesh* plane2 = smgr->addHillPlaneMesh("Plane2", // Name of mesh
core::dimension2d<f32>(20,20), // Size of a tile of the mesh. (10.0f, 10.0f) would be a good value to start, for example.
core::dimension2d<u32>(80,80), 0, 0, // Specifies how much tiles there will be. If you specifiy for example that a tile has the size (10.0f, 10.0f) and the tileCount is (10,10), than you get a field of 100 tiles which has the dimension 100.0fx100.0f.
core::dimension2d<f32>(10,10), //material
core::dimension2d<f32>(1,1)); //countHills
// smgr->setPosition(core::vector3df(0,0,30));
//mesh, waveheight = 0.5f, wave speed = 350.0f, wave length = 80.0f
ISceneNode* sea2 = smgr->addWaterSurfaceSceneNode(plane2->getMesh(0), 50.0f, 390.0f, 100.0f);
sea2->setPosition(core::vector3df(230,230,30));
sea2->setMaterialTexture(0, driver->getTexture("../../media/water.png"));
sea2->setMaterialFlag(EMF_LIGHTING, false);
sea2->setMaterialType(video::EMT_REFLECTION_2_LAYER);
sea2->setMaterialType(video::EMT_TRANSPARENT_REFLECTION_2_LAYER);
//
}
"
Looking for any help