example code of animated water
example code of animated water
how would i use it on a regular mesh need an example want too clear on the tutorial.
-
HM
Are you asking how to made a terrain mesh into animated water? Just use code like this:
Code: Select all
node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f);
node->setPosition(core::vector3df(0,0,0));
node->setMaterialTexture(0, driver->getTexture("./water.jpg"));
node->setMaterialTexture(1, driver->getTexture("./riverbed.jpg"));-
HM
You have to load something into the mesh first of course
Code: Select all
scene::IAnimatedMesh* mesh = smgr->getMesh("./model.3ds");