Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to generate a convex static collider per-brush #377

Open
nukeandbeans opened this issue Jan 10, 2023 · 2 comments
Open

Option to generate a convex static collider per-brush #377

nukeandbeans opened this issue Jan 10, 2023 · 2 comments

Comments

@nukeandbeans
Copy link
Collaborator

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.
@shayded-exe
Copy link

Yes, this would be very nice! I've resorted to just using multiple CSG models.

@D2Lx0wse
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants