# Unity: How to cut a line (or curve) at a specific point and animate it?

What would be a good approach to cut a line (or curve) at a specific point (let's say we use the mouse pointer to detect the position of the cut).

The curves you see in the image above, are Bezier curve generated using the LineRenderer and have a PolygonCollider2D attached that covers the entire curve (taking the width set to the LineRenderer into consideration).

Imagine a game like Cut the Rope or Fruit Ninja, where you use the mouse pointer to cut the wires. I already implemented the cut detection algorithm, so I know the point where my wire needs to be cut. I would like to know how can I snap the wire in two and add some sort of animation.

• I don't think you can achieve this easily with Bezier Curves. Games that I'm aware that have ropes or anything can make curves or be cut actually are bunch of segments connected, and not a single line.
– DH.
Jul 29 '16 at 13:28
• I could create my own Wire class that's made up of multiple segments, each segment being a game object with a LineRenderer. I can then detect which segment was cut. I still can't wrap my head around how could I animate the cut. Jul 29 '16 at 13:30
• By animating you mean what? An "slashing" animation or the ropes moving after removing a segment?
– DH.
Jul 29 '16 at 13:38
• Since this are some sort of bomb wires, I think the animation should be the line splitting in two at that point and move the parts away from each other, they don't need to drop. Adding the slash effect should be pretty straight forward. Jul 29 '16 at 13:42