x


Slicing Objects

Hey I have tried researching the code for this and have found very little information, basically what I am wanting to do is to slice an object with the mouse in game. Like cut a piece off the object. Similiar to the game 3 slice which can be found here http://www.physicsgames.net/game/3_Slices.html , if anyone can help me with the code for this it would be greatly appreciated, feel free to email me at mickc92@live.ie

more ▼

asked Apr 26 '12 at 05:45 PM

MickC92 gravatar image

MickC92
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort newest

Mick,

You'd probably have better luck with this on the forums - it's not really a technical question per se. Certainly take a look at the procedural mesh code (http://unity3d.com/support/resources/example-projects/procedural-examples.html).

What you're going to want to do is figure out the plane of your slice. Then, look at a mesh as a series of triangles, which are made up of line segments. Find every segment that passes through the plane, then cut off the part of the triangle that passes through the plance. Finally, patch up any holes that are created.

Good luck.

more ▼

answered Apr 26 '12 at 05:50 PM

Julien.Lynge gravatar image

Julien.Lynge
7.4k 20 25 51

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3738
x1952
x1096
x798
x8

asked: Apr 26 '12 at 05:45 PM

Seen: 1049 times

Last Updated: Apr 26 '12 at 05:50 PM