Improved clipping retry - #41
Merged
Merged
Conversation
marchc1
approved these changes
Aug 16, 2026
After removing clips from a primitive, client side traces have issues intersecting the rebuilt mesh. Inspired by fixes in the think hook and from Improved Clipping, this seems to work.
When clipping multiconvex props, some convexes wouldn't touch the clipping plane at all, yet were removed. This should fix that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for ImprovedClipping by cutting the physics meshes of primitives via the existing bisect function.
This was done by adding additional face data on the server, to create a triangle physics mesh.
Sealed clips are only supported for the single convex shapes (e.g. cube) and are not supported for multi convex shapes (e.g. tubes). You can still clip them and the physics will be clipped, but the cut will not be visually sealed.
More explicitly:
construct.get/generateaccept an optional clips list, threaded down togetResult, which bisects the built mesh against them and rebuilds convexes for physics.simpleton:ApplyClips, which cuts a simpleton against a list of clip planes, capping per each clip's Seal flag.simpleton:PushConvex/PushBoxConvex, which is used to store convex data on shapes, for use with bisect.PushPrefabto build a matching convex simpleton, for the compositional shapes such asrail_slider,airfoil, etc.airfoilcannot be clipped because it is just an arbitrary point cloud, not a set of convexes.