------------- MAIN POST STARTS HERE ------------------------------
Hey all,
Title says that my brain’s metled… that’s true.
Over last few days been learning and implementing the Sutherland-Hodgman clipping systems to slice meshes on the fly.
However, once I’ve split one object into two (each with half of the original mesh) I’m still left with a full original sized box collider ON BOTH OBJECTS.
How do I go about resizing this?
As I said, just finished learning this, and debugged the bug(ger) so I need a break, some caffeine, and (since this is a new aspect of the small project) some help…
------------- MAIN POST OVER------------------------------------
------------- FURTHER INFO STARTS HERE -----------------
FURTHER INFO:
When I’m slicing the objects I’m not changing the origin - so both objects have an off-center origin point. This leaves the object ‘floating’. Not sure how to adjust for this.
I was looking into ‘bounds’, but it says that they’re axis aligned so don’t think they will work, is that right?
I’ve tried deleting and re-adding the box colliders. However this produces a box collider with full scale size of 1, meaning it’s bigger than the new meshes.
POSSIBLE SOLUTION (please slap me if this was the solution all along):
Should I just run a script that finds that highest and lowest points of the mesh then realign the box colliders centre and size around this? (Of course would do the same for the width). Is there a better solution?
Concerned about overhead of my coding here, especially as slicing a primitive sphere or capsule is intesive enough as it is (full visual/input lockup for 2 seconds or so).
P.S. Sorry for the stinky post ![]()