Solved, the problem was into the storage way of the erased triangles
Raycast returns Bad Triangle Index after delete triangles in mesh...
When i delete triangles into the mesh and save the mesh, you can see correctly the new mesh but when you assign mesh collider and get the tringle index with raycast, return a bad triangle index....
What is the correct way to delete triangles of a mesh and after with raycast get the correct triangle index with the new edited mesh?
It seems that the array of triangles is disordered, but you can see the mesh with normals correctly.
Answer by Z11 · Nov 07, 2015 at 11:52 AM
Solved, the problem was into the storage way of the erased triangles.
Also, if you are modifying mesh at runtime, collider will not update until you do:
meshCollider.shared$$anonymous$$esh = null;
meshCollider.shared$$anonymous$$esh = mesh;
nop im not updating during run time... Basically i do: -Delete triangles and save the mesh (Close scene), -(Open Scene with new Edited $$anonymous$$esh) Re edit and delete triangles of the new mesh.
Now i can :D
Follow this Question
Related Questions
Why built-in Plane has so many tris? 3 Answers
Sorting through the triangles of a NavMesh to get a single triangle from a specific area? 1 Answer
Can't get submesh to work 1 Answer
Mesh manipulation : My object is in the field of view but Unity thinks it's not 2 Answers
How can I generate mesh triangles with the particles for a plexus effect ? 0 Answers