The bounding box area detection seems to use well on many object shapes but..... how about some object like an airplane? Imagine about the wing that spread wide out of the plane's body but thin......if you use the bounding box area detection it will collision before we can even touch the airplane's body. Is their any other way like using the surface of the object to detect the collision instead of bounding....or is their any working function to do this?
ps:How can I install irrlicht spintz? Do spintz is the only way to display the object surface more than 65000?
Any better way to detect collision of object than bound box?
Bounding volume [box, sphere, cylinder] collision testing is a very efficient and inaccurate method for determining that two objects are very close to each other. Normally such tests are used to determine that two objects are close enough to warant the use of more accurate [and expensive] collision testing methods. There are many algorithms for fast and accurate collision testing, none of which is implemented in Irrlicht.
Irrlicht does provide the triangle selector for accessing triangles. You could use this to build a collision detection system. If you are going to have more than a few collidable objects I would suggest doing some research and either using a library or writing your own to fit your needs. Most physics libraries [like ODE ant Newton] provide collision detection for you.
This url may provide some useful tips.
Irrlicht does provide the triangle selector for accessing triangles. You could use this to build a collision detection system. If you are going to have more than a few collidable objects I would suggest doing some research and either using a library or writing your own to fit your needs. Most physics libraries [like ODE ant Newton] provide collision detection for you.
This url may provide some useful tips.
You can get IrrSpintz from here. It is just a modified version of Irrlicht with some patches and updates by Spintz.
It is the easy way to get past part of the 65k vertex limit. Some of the file formats actually have that same limit, so you may find yourself switching file formats also.
At this point I don't really know a good reason for a game to allow that many vertices in a single mesh buffer. Bump mapping can go a long way to reducing poly/vertex counts on complicated geometry. If you are using a large area model [like a city], I'd think you would want to break the model up into blocks so you don't have to render all of it when only part of it is on screen.
Anyways, it is there if you feel that you need to have it.
It is the easy way to get past part of the 65k vertex limit. Some of the file formats actually have that same limit, so you may find yourself switching file formats also.
At this point I don't really know a good reason for a game to allow that many vertices in a single mesh buffer. Bump mapping can go a long way to reducing poly/vertex counts on complicated geometry. If you are using a large area model [like a city], I'd think you would want to break the model up into blocks so you don't have to render all of it when only part of it is on screen.
Anyways, it is there if you feel that you need to have it.
Thanks very much. Can I ask few more questions?...Hmm can you explain how to apply triangle selector? because in the code that I have written, the triangle selector was auto built to detect the collision at surface of bounding box......I think that if the triangle selector was build for checking collision maybe it can change its position to go closer to the real surface of the model(which means that it can detect more correctly)....
this is a sample code.
//collid model & model
scene::ITriangleSelector* s = 0;
IMetaTriangleSelector* mainTriangleSelector = smgr->createMetaTriangleSelector();
s = smgr->createTriangleSelectorFromBoundingBox(node);
node->setTriangleSelector(s);
mainTriangleSelector->addTriangleSelector(s);
anim = smgr->createCollisionResponseAnimator(mainTriangleSelector, bnode, core::vector3df(5,5,5),core::vector3df(0,0,0), core::vector3df(0,0,0));
bnode->addAnimator(anim);
anim->drop();
and my model type was .X type......will I have to change to another one if I have turned to use spintz?
this is a sample code.
//collid model & model
scene::ITriangleSelector* s = 0;
IMetaTriangleSelector* mainTriangleSelector = smgr->createMetaTriangleSelector();
s = smgr->createTriangleSelectorFromBoundingBox(node);
node->setTriangleSelector(s);
mainTriangleSelector->addTriangleSelector(s);
anim = smgr->createCollisionResponseAnimator(mainTriangleSelector, bnode, core::vector3df(5,5,5),core::vector3df(0,0,0), core::vector3df(0,0,0));
bnode->addAnimator(anim);
anim->drop();
and my model type was .X type......will I have to change to another one if I have turned to use spintz?
createTriangleSelectorFromBoundingBox will make give you a triangle selector for the bounding box of a node. If you want to get triangles from the actual mesh instead of its bounding box, you should use createTriangleSelector or createOctTreeTriangleSelector.
I don't know the limitations of the X file format, so I don't know the answer to your second question.
Travis
I don't know the limitations of the X file format, so I don't know the answer to your second question.
Travis