So, how could I change the cube's mesh? I can access it like cube->mesh, but there is no change function so how do I do it? Tried with
cube->mesh = smgr->getMesh(bla) but nope.
Mag-got wrote:cube->mesh = smgr->getMesh(bla) but nope.
that should work...
but of course this has no effect on the node or the collision, as far as you're only changing the mesh...
so when you're changing the mesh you'll also have to remove the old node and collision and create new ones...
Also, it would really help if you posted links to what you're referring to, rather than assuming that we know what "the example of Irrlicht and Newton" is supposed to mean. I might follow a link, but I'm certainly not going to search for the problem, rather than the solution.
I don't really care about anything else than the mesh, so that means I have to destroy the old one and create a new one, you can't assign a new mesh to a node? Could've been easier.
You should look up the API, you *can* change a node's mesh via setMesh(), but that will only work for IMeshSceneNodes. The CubeNode is a MeshSceneNode in the next Irrlicht version, but it will refuse to change its mesh (otherwise it wouldn't be a good cube node ). But once you work with real meshes you'll see that it works as expected.