title: Alternatives for updating mesh collider in runtime?
body: <p>I'm working on game where user generating mesh in runtime (all the time) so mesh have many vertices and in the same time there is a GameObject - player that need to trigger event when it is in area of this generated in runtime mesh.</p>
  
  <p>Camera in this game is 3D, but this generated mesh is flat. In my attached drawing I show this in top view to better show how it looks like.</p>
  
  <p>Now I'm updating Mesh Collider every few seconds, but it is very slow after generated mesh have more and more vertices.</p>
  
  <p>I believe that this is very simple method of collision so maybe there is any other method to detect this instead of Mesh Collider attached to dynamically generated mesh?</p>
  
  <p><strong>UPDATE #1</strong></p>
  
  <p>I know that Mesh Collider is very slow and should not be updated in runtime. I also know the idea that should use primitives like box collider. </p>
  
  <p>But in this situation when this flat mesh in updated every second (and it grow) it will be thousands of box colliders and new need to be added every second. This method will also not work.</p>
  
  <p><strong>UPDATE #2</strong></p>
  
  <p>My second idea is to find nearest triangles to player and create colliders for them (box colliders should be fastest). But I really have no idea where to start or it is even possible ?  Someone ?</p>
  
  <p><a href="https://i.stack.imgur.com/U8oQN.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/U8oQN.jpg" alt="Drawing 2, as an answer for @Hristo"></a></p>
  
  <p><a href="https://i.stack.imgur.com/pwllb.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/pwllb.jpg" alt="Drawing"></a></p>