example code of animated water

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
double99
Posts: 28
Joined: Sun Oct 31, 2004 1:07 am

example code of animated water

Post by double99 »

how would i use it on a regular mesh need an example want too clear on the tutorial.
HM

Post by 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

Post by HM »

You have to load something into the mesh first of course

Code: Select all

scene::IAnimatedMesh* mesh = smgr->getMesh("./model.3ds");
Post Reply