realtime-CSG-for-unity
realtime-CSG-for-unity copied to clipboard
Option to generate a convex static collider per-brush
The Idea:
This would provide an option for a brush to be excluded from the model mesh collider, and generate a single convex mesh collider for just the specific brush tagged as such.
The Possible Implementation:
- Perhaps there would be a checkbox in the "Place" tab when a brush is selected, and an option in the "Generate" tab that would enable this option.
- When the option is enabled, it would disable the "Collision" flag, and instead generate a single
MeshCollider
object in either a unique sub-object of the model (something like[generated-convex-meshes]
), or the existing[generated-meshes]
object. There could be a global setting to enable this by default, if desired.
Notes:
- This would possibly solve the issue some users have, where
MeshCollider
is penetrated by fast moving objects, from a failed collision check due to fixed timestep on an infinitely thin collider. - This could possibly also provide an option to use a specific
PhysicMaterial
or tag per-brush, which would translate to the final collider, and allow the user to have an easier time setting up things like slippery surfaces, footsteps, etc. without having to do complex calculations against the render mesh, or manually placing these colliders in the scene. - There is a ton of other use cases for this, all which would be beneficial to everyone, I think.
Yes, this would be very nice! I've resorted to just using multiple CSG models.
yes! this would be super useful! I'm making a map for a physics intensive game and this would help a lot with tinyer rigidbodies