Hi,
Im new in irrlicht and i need to know how can i simulate a moving water (like a river).i was thinking to someting like moving the water texture but i don't know how
Sorry for my bad english
Please help me
First of all, learn patience. Why do you think that you receive answers in about 2 hours?
Next thing: What did you achieve as of now? As you see going through the tutorials would reveal much of Irrlicht's features. Maybe you find something useful in there.
Anyway, for a river some texture animator (either the one from Irrlicht or a custom one based on Texture matrices) might be what you need. Check that one and ask again if you tried it but did not succeed.
thanks for your answers, i saw all the irrlicht tutorials but none of them is what i need.All i need is to move the texture (with TextureMatrix() i think ) but i don't understand how to use that function.
Can some one show me how to use TextureMatrix ?
Hi, I don't understand textureMatrix() function
I have this little code : #include <irrlicht.h>
#include <iostream>
using namespace irr;
#pragma comment(lib, "Irrlicht.lib")
///Camera///
scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
camera->setPosition(core::vector3df(-50,50,-150));
device->getCursorControl()->setVisible(false);
while(device->run())
if (device->isWindowActive())
{
driver->beginScene(true, true, 0);
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
can some one show me how to move texture "water.jpg" in that code(to simulate flow of a river)
Please help me because i need that. Thanks.
1. Don't use the water scene node
2. get Material from a scene node you have the model of the river in
3. getTextureMatrix of layer 0
4. change the translation of the texture coords by using setTextureTranslate() on that matrix.
I don't need to rotate or scale the texture, I need to move it .
I think it's a bug with setTextureTranslate().
Anyway thanks again for your help, Hybrid.
I think he wants to animate a mesh to make it look like its moving water.
The EASIEST way to do this would be creating a 3D model of it. I know you can use 3D World Studio to create a terrain, add water etc and load it on to Irrlicht. There's even a tutorial on it.
It's not easy animating water using a 3D engine- better to create a base model, load it and add the "water" model to the cordinates you want and scale it to fit.
It's the easiest way if you know how to model. Using transformers on seperate loaded models might get a bit messy, so transforming the model itself on 3DS Max or whatever might be what your looking for.