I’m currently developing a dynamic water system, but I made a break to develop this tool. It allows you to cut a mesh along a plane by giving a normal vector and a point. Here’s a screenshot:
I want to release it on the asset store but I don’t know what price would be appropriate. I don’t think that it’s really optimized or well coded, but it works.
it’s hard to tell, since these are only cubes. but if it works, it’s usable.
the plane is finite, right?
the cut pieces look like as if they would be welded together after the cut, but other than that, the demo looks ok.
Why the plane should be finite? To cut a gameObject you have to do something like Cut(gameObject), in the demo this fonction is call on all the gameObjects in the scene.
then it’s okay, if you can define the gameobject to be cut.
but it looks like in this demo only one cut is possible (in the previous demo there was more cuts) and
looks like too many cut-points (vertices and triangles) are generated, but it could be that these shapes are high-poly. I dont see if the quality setting would change them to lower numbers/less tris.
also, these are still basic shapes. does it work with any shaped mesh?
The number of vertices and triangles added is as low as possible, but what generate the most of triangles is fill the cut face: that’s why I added a new option to choose to generate these triangles or not.
These shapes are the Unity basic shapes, so I added the possibility to spawn cars (lot of vertices, so be careful don’t spawn 10 000 cars).
The quality influence the precision of the cut; for a x quality, the precision is approximately: (distance between 2 vertices)/2^x
I’ve also added submesh support, with a thread for each submesh, basic uv support and I fixed the cut position.
Thanks for this models! They allowed me to see another problem of my script, the non-support of parents structure.
I would be far from my computer during at least 2 weeks, so don’t expect any answer during this time.