Run-time mesh create or/and deform

Is it possible to create mesh on run or deform it?

Yep! Here is an example of modifying a mesh at run time to break it in pieces and here is an example that spawns meshes.

1 Like

The break example, I think, actually replaces original object with chunks. Its not deforming (changing vertices positions, etc) anything.

The spawn copy+pastes an existing object into scene. I doesn’t create anything. I would like to define new object via code.

I think the PhysicsBreak.hx script from examples could give some good insights, how to create new objects but it’s freaking 800 lines :smiley:

1 Like

That’s a good point. :slight_smile: The 800 lines is probably all of the math that it does to figure out how to crack an object into pieces. To do deformations, you might just be able to modify the mesh object’s data. The mesh data is loaded from the scene files that are exported from armory; if you update the mesh data at runtime, that might work.

Yeah thanks. I created an working example, and the found an existing example > :D. Can work with that :wink:


Updating links
Generating mesh: