Search Unity

Create mesh out of LineRenderer and LineRenderer Collision detection

Discussion in '2D' started by Arthurvd, Jun 21, 2019.

  1. Arthurvd

    Arthurvd

    Joined:
    Dec 17, 2018
    Posts:
    1
    So, i'm currently working on a Paper.io replica. And I was wondering how I could instiate a mesh out of LineRenderer points when there is a collision detected between the linerenderer and the current mesh itself. To give you a more in depht idea about the game mechanics, so basically you have an object in a 2 dimensional world you can move it wherever you want. In the beginning of the game it instantiates a mesh in the shape of a square and whenever you go out of this square the player has a linerenderer when the player would hit the linerenderer it would destroy itself and the goal is to hit the mesh and reshape the mesh so that the mesh expands to the current mesh + the area inside of the shape you created with the linerenderer. So does someone know a script for this or can someone give advice on how to construct one?