Is it possible to change a mesh at runtime?

I want to make a simple (at first) game in which the player has to fire a ball at a target over a landscape, the ball is to be explosive, so if it hits the landscape the landscape should be altered, as though a hole was blown off. it cannot be scripted, because there is no way to know where the ball will hit on the landscape… is there any way to make that work?

what you could do is you could make a mesh that looks like a destroyed piece of land then add it where ever the fire ball lands. and use a get hit normal script to change the orientation.

The only way I know how to do this, is have the landscape in a bunch of parts and when it hits a certain object, it plays an animation or something…

For example:
You can have a mountain, and the top is a part, the middle and the bottom… When you hit the top, it plays an ipo of the rocks breaking apart on the bottom of the mountain, for the middle you do something else and for the bottom…

It’s not very hard, but if you really want to make it fully destructible and cool, you’ll need python and good animations that look like you really made it fall… :wink:

Good Luck!

In blender 2.5 you could use python to alter the vertices and vertex colors where the fireball hits, then use ideasman’s new recalculate physics mesh function to make the changed vertices effect the physics. That will work, but you’ll have to wait for the next version of blender, or build your own.

thanks for the replies, in that case i’ll wait, although i dabble in programming building a different version of blender is not something i’m interested in at the moment