- Home /
How to dynamically change the shape of a mesh during runtime?
Hello,
I'm pretty new to Unity and am working on a project for my university. What I'm trying to do is allow the player to control a machine that will drill into a piece of metal, and have the piece of metal reshape as it is touched by the drill. Is there a way to create a mesh that will change itself based on these properties? If so, what scripting functions should I look into in order to accomplish this? Are there any examples of it that I can look at to get a better idea of how to proceed?
Thanks!
Answer by Baste · Jun 09, 2015 at 03:18 PM
See the second example here to see how to modify a mesh.
Creating solids that reshape themselves as opposed to hollow meshes (IE. destructible terrain as in Space Engineers) is real hard. You have to model what parts of the body that's been destroyed, and then figure out how to draw a mesh that matches the hole.
I'd suggest searching for "destructible terrain" and see if you can find anything good.
Your answer
Follow this Question
Related Questions
Generating Mesh at runtime, vertex count different 0 Answers
change the mesh of object during runtime using javascript 1 Answer
Best way to transition one mesh to another with the option to change the target mesh 0 Answers
Dynamically changing part of a texture v2 1 Answer
Dynamic Mesh Collider - Optimization 1 Answer