I have a quad/triangle/anything, and I want to actually put a hole in it, not decals or anything, when a cannon goes through it. This means i have to change its geometry dynamically, but I have little knowledge as to how to do such a thing.
Can someone explain the basics and/or how to go about this idea?
thanks,
esaptonor
Putting a hole in a quad
well you can code this by vertex subdivsion... but it will be really cool if you replace the quad which is predicted to by hit(use cannon ray and collision manager) with cubes simulated by a physics engine.
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
If you want modern rendering techniques learn how to make them or go to the engine next door =p
well yeah, my aim eventually is to have it split into broken bits that go flying, but first i need to learn how to dynamically break apart the quad or triangle.
How do I do that within irrlicht?
I guess i need explained how to add vertices to any mesh at any point so that i can make a hole.
If its possible to break a face off a model that would work too i guess.
I dont currently understand how the vertices and indices actually work either, for example, when i tried adding indices to the array of an smeshbuffer to create some new triangles with a new vertex i added also, the whole thing stopped saying 'user defined break point' even though i didn't set any...so if someone could explain that i would be greatfull too.
Thanks again,
esaptonor
How do I do that within irrlicht?
I guess i need explained how to add vertices to any mesh at any point so that i can make a hole.
If its possible to break a face off a model that would work too i guess.
I dont currently understand how the vertices and indices actually work either, for example, when i tried adding indices to the array of an smeshbuffer to create some new triangles with a new vertex i added also, the whole thing stopped saying 'user defined break point' even though i didn't set any...so if someone could explain that i would be greatfull too.
Thanks again,
esaptonor
I've given up on this long ago, but for a while I was toying around with the notion of incorporating constructive solid geometry (CSG) for the impact zone and a custom particle system for debris.
There's a CSG library around somewhere, but I can't remember what it's called. I gave up on it before trying to see how/if it would work with Irrlicht, but it might be something you want to check into.
There's a CSG library around somewhere, but I can't remember what it's called. I gave up on it before trying to see how/if it would work with Irrlicht, but it might be something you want to check into.