Search Unity

How to create a "Lasso" system? - Mobile

Discussion in 'Scripting' started by jieep13, Feb 12, 2016.

  1. jieep13

    jieep13

    Joined:
    Jan 25, 2016
    Posts:
    20
    Hello Folks,

    I've been working on a personal project, and I have though in a lot of ways to do a mechanism like a lasso but unfortunately, I've had no success. I'd like to make a system which every time the player draw a circle around the object, it must be destroyed, like the picture below: (Please don't care about my drawing skill)




    I'd like to destroy this red dots. How could I do this system in mobile devices?

    Thanks!
     
  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    A few aspects:
    drawing line from touch input.
    Creating "areas" when the line crosses existing line (determine intersection, determine shape of area).
    Determine if point is within arbitary shaped area.

    Have you got any of those aspect done yet? Just trying to figure out where we're starting from.
     
    jieep13 likes this.
  3. jieep13

    jieep13

    Joined:
    Jan 25, 2016
    Posts:
    20
    Thanks leftyRighty. I had tried to draw a line, but after this, It's really complex.