Search Unity

How to cut an object in any direction

Discussion in '2D' started by nihonjindayo, Aug 5, 2019.

  1. nihonjindayo

    nihonjindayo

    Joined:
    Jun 30, 2019
    Posts:
    2
    Hello. I have a question about Unity2D.
    English is not my native language so please forgive my poor vocabulary.

    On Unity2D, I can't find how to cut an object in any direction and divide it into two objects.



    As shown above, start moving your finger or player character in any direction from the START point. ObjectA is not divided at this point. When the cursor finally reaches the END point, your finger or player character draws a trace like a dotted line as a result. As soon as the END point is reached, ObjectA is destroyed and ObjectB and ObjectC are created. (Note: The gap between B and C does not actually exist.)

    How do I do this? That is the specific question content.
    I could find some ways to cut sprites in a straight line, but I can not think of how to apply them to cut them in a curve like this.

    In addition, I want to add different operations to ObjectB and ObjectC after cutting, so it would be very helpful if you could give me a rough procedure for finding these two objects.
    Thank you.
     
    Last edited: Aug 5, 2019
  2. nihonjindayo

    nihonjindayo

    Joined:
    Jun 30, 2019
    Posts:
    2