OK. And yes it already exists the wrapper for physx 2.x.x series but not for 3.x.x series. That's what I meant by adding functionality. Here is what I wanted to :
Player shoots at the wall and if the gun is powerful enough than pieces of the wall fall down.
Destruction in Irrlicht
-
- Posts: 36
- Joined: Mon Jan 23, 2012 11:14 pm
- Location: Lancs, UK
Re: Destruction in Irrlicht
I would do something along these lines.
Then process your class' objets every frame doing getCollisionPosition and updating velocity every frame.
Personally, for collision, I do this with GCP:
Code: Select all
wall = smgr->addMeshSceneNode
wall->setID(100) //strength
wall->setname("destructible")
ITriangleSelector...bla bla bla
if (collision ray)
if ((stringw) node->getname() = (stringw)"destructible")
if (node->getid() > player[firing]->getweaponpower())
breakwall(node);
breakwall(ISceneNode* node)
{
// Remove node mesh
// Replace with certain array in a class
}
Personally, for collision, I do this with GCP:
Code: Select all
if (triout.getArea()) //if there's a collision
{
vector3df wallnormal = triout.getPlane().Normal; //This is the direction we cannot move in.;
obj->plane->v -= wallnormal * obj->plane->v.dotProduct(wallnormal) * 2; //Bounce back!
obj->plane->v *= 0.5; //Bounciness
da -= wallnormal * da.dotProduct(wallnormal);
obj->plane->p += wallnormal * 0.01; //Shove the thing out of the way
}
-
- Posts: 36
- Joined: Mon Jan 23, 2012 11:14 pm
- Location: Lancs, UK
Re: Destruction in Irrlicht
This is assuming that I already have my object tessellated ... . Looks interesting.
Thanks for reply and patience
Thanks for reply and patience
Re: Destruction in Irrlicht
Using a 3d modelling program is an essential skill for making 3d games. Take the time to learn a free one like Blender.
Re: Destruction in Irrlicht
Ehh! Blender isn't just "a free one"!
It's a very good one too! This demonstrated by the fact that Blender comes with a superb voronoi Cell Fracture addon, so you can really easily create your destroyed objects and export them.
See Using the Cell Fracture Add-on in Blender
It's a very good one too! This demonstrated by the fact that Blender comes with a superb voronoi Cell Fracture addon, so you can really easily create your destroyed objects and export them.
See Using the Cell Fracture Add-on in Blender
Re: Destruction in Irrlicht
That's amazing ace, it may be even better than 3ds' standard algorithm.
-
- Posts: 36
- Joined: Mon Jan 23, 2012 11:14 pm
- Location: Lancs, UK
Re: Destruction in Irrlicht
Hi ACE247!
Thanks for the advice. Ill try blender. And maybe replace chunks of broken wall with PhysX cubes.
Again Thanks.
Thanks for the advice. Ill try blender. And maybe replace chunks of broken wall with PhysX cubes.
Again Thanks.
-
- Posts: 36
- Joined: Mon Jan 23, 2012 11:14 pm
- Location: Lancs, UK
Re: Destruction in Irrlicht
Omg! Didn't know that blender is so cool. Sorry if I sound like teenager but that video from ace just amazing!
-
- Posts: 36
- Joined: Mon Jan 23, 2012 11:14 pm
- Location: Lancs, UK
Re: Destruction in Irrlicht
Hello again
At the moment I'm trying to get the Blender destructed files to work with irrlicht btw Blender ....
Although Blender has pretty much solved my issue with destruction, I would still like to get APEX to work as well. So, I saw a book "Irrlicht Beginners Guide". Would that book help me with getting APEX to work?
Thanks in advance for replies and for patience
At the moment I'm trying to get the Blender destructed files to work with irrlicht btw Blender ....
Although Blender has pretty much solved my issue with destruction, I would still like to get APEX to work as well. So, I saw a book "Irrlicht Beginners Guide". Would that book help me with getting APEX to work?
Thanks in advance for replies and for patience