- Home /
Update mesh collider after changing vertices at run time
Hey guys, So I am modifying the vertices of a mesh at run time and the only way I've found to update the mesh collider is the following: public void updateVertices() { mesh.vertices = vertices; transform.GetComponent().sharedMesh = mesh; } If the modified vertices are known, is there anyway to update only that section of the mesh collider, or are there any other more efficient methods you guys know about?
Answer by lAntonin · Mar 26 at 07:37 PM
Hello, did you try for modify your mesh on runtime : "GetComponent().sharedMesh = mesh;" ?
Your answer
![](https://koobas.hobune.stream/wayback/20220612160138im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Change code at runtime 3 Answers
Need to update Material/Renderer before they can be applied? 0 Answers
LoadImageIntoTexture Runtime Change 1 Answer
Best way to handle many versions of same GameObject? 1 Answer
Prefabs Transforms LookAt 0 Answers