Comments (3)
Hello @The-MAZZTer,
Have a look at https://github.com/DavidArayan/ezy-slice/blob/master/EzySlice/Framework/Plane.cs#L83. This function takes a Vector3 and lets you know which side of the plane the point is on.
Since you already have a Plane object (needed to make cuts) you can perform this test on the application side. The code will follows.
- Perform the slice operation using a Plane
- If the slice is null, grab a random vertex (maybe first point?) from the mesh you were trying to cut.
- Test this point against
myPlane.SideOf(myVertex)
which will returnSideOfPlane.UP, SideOfPlane.DOWN or SideOfPlane.ON
from ezy-slice.
I am using UnityEngine.Plane.GetSide which does the same thing and I have that working. Not sure why you have your own Plane class but I haven't looked at it; I assume there is a good reason though.
I pretty much did what you described. I just think it would be nice to not have to do that extra step since the .Slice function has that information anyway.
from ezy-slice.
Probably because UnityEngine.Plane just didn't exist or was incomplete when I worked on this code!
from ezy-slice.
Related Issues (20)
- Apply to Animated Model? HOT 5
- Bug: wrong slice direction when object we want to cut has different localscale on axis HOT 1
- How to test an example project?
- The name 'Normal' does not exist in the current context HOT 1
- Script Doesn't Link To Editor HOT 2
- Oculus Quest crashing HOT 7
- Slicing Unity's sphere results in meshes with uncovered holes HOT 5
- When cutting a complex mesh, the face does not respect the geometry HOT 1
- Get the intersection points HOT 2
- Lost HOT 4
- Doesn't work for more complex objects HOT 6
- After slicing the game object the original prefab holes are closed , the region is filled? i wanted to know if we can retain the original holes in the obj after slicing the game object ? HOT 3
- Ezy Slice - imported objects don't get sliced HOT 4
- Randomly doesn't slice (this could well be user error) HOT 2
- Can't download the project through unity git system. HOT 1
- [bug]Cut a hollow object in the middle. The object after cutting is incorrect HOT 1
- I'm curious. This object is not complex, but it can't be cut HOT 1
- Unexpected hole patching after slice HOT 1
- how can i add internal material to sliced object
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ezy-slice.