I've been experimenting with Irrlicht for a while now, and am finally putting a prototype of a "3d world" much like a MMORPG 3d world.
At any given time there will be a number of "objects" as I call them in the world.
each object has a 3d model with a built in skin texture.
each object is able to be manipulated in a way so that it can be moved, rotated, etc, in other words animated.
Each object has a IMesh or IAnimatedMesh, now this is the part Im not sure about, and I've searched my heart out on these forums and could not find the answers I'm looking for.
1. are "IAnimatedMesh" meshes only of the type of file that contains animation data?
2. Can i animate regular "IMesh"es? I'm assuming "IMesh"es are usually derived from a mesh file that doesn't contain animation data.
3. Why can't I set up a triangle selector for regular "IMesh"es?
setting up my array of "objects"
setting up my array of "objects"
I R noob.
Please don't harp on me for asking noobie questions in the noob forum
Please don't harp on me for asking noobie questions in the noob forum
-
- Posts: 370
- Joined: Mon Aug 29, 2005 10:54 pm
- Location: http://web.utk.edu/~pfox1
1) I'm pretty sure IAnimatedMesh is just IMesh with animated data, if you have no animation, use IMesh (it's a little faster and smaller in memory) otherwise use IAnimatedMesh
2) What do you mean by animate? You can rotate, translate and scale them to achieve animation, but I don't think there's a way to move vertices or bones to achieve animation at run time. You could modify the engine to make this possible however. Someone (Acki I believe) coded a modification that lets you manipulate the bones of .x files at runtime.
3) You should be able to setup a triangle selector on an IMesh, in fact createTriangleSelector takes an IMesh as its parameter, so I don't see what the problem is.
2) What do you mean by animate? You can rotate, translate and scale them to achieve animation, but I don't think there's a way to move vertices or bones to achieve animation at run time. You could modify the engine to make this possible however. Someone (Acki I believe) coded a modification that lets you manipulate the bones of .x files at runtime.
3) You should be able to setup a triangle selector on an IMesh, in fact createTriangleSelector takes an IMesh as its parameter, so I don't see what the problem is.
thanks for the reply
how should I set a triangle selector on an animated mesh
edit:
should i be doing:
?
I meant to say why cant i set up a triangleSelector on an IAnimatedMesh.pfo wrote:3) You should be able to setup a triangle selector on an IMesh, in fact createTriangleSelector takes an IMesh as its parameter, so I don't see what the problem is.
Code: Select all
triangleSelector = smgr->createTriangleSelector(animatedMesh,worldObjectNode);
Code: Select all
c:\Documents and Settings\Owner\Desktop\game development\LampStand\WorldObject.cpp(50): error C2664: 'irr::scene::ISceneManager::createTriangleSelector' : cannot convert parameter 1 from 'irr::scene::IAnimatedMesh *' to 'irr::scene::IMesh *'
edit:
should i be doing:
Code: Select all
triangleSelector = smgr->createTriangleSelectorFromBoundingBox(worldObjectNode);
I R noob.
Please don't harp on me for asking noobie questions in the noob forum
Please don't harp on me for asking noobie questions in the noob forum
this is how i do it
i create an object class
in it i create a triangle selector(it can be a octree for accuracy or from BB for speed) from the mesh then i add it to the meta triangle selctor common to all nodes
CObject*objects[100];//adds 100 objects
objects[50]->node.setPosition(core::vector3df);//moves object 50
i create an object class
in it i create a triangle selector(it can be a octree for accuracy or from BB for speed) from the mesh then i add it to the meta triangle selctor common to all nodes
CObject*objects[100];//adds 100 objects
objects[50]->node.setPosition(core::vector3df);//moves object 50