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

Allow explicit creation of rigid body collision shapes for blender / gltf imports. #9859

Open
jitspoe opened this issue Jun 1, 2024 · 0 comments

Comments

@jitspoe
Copy link

jitspoe commented Jun 1, 2024

Describe the project you are working on

2.5D platformer & retro FPS.

Describe the problem or limitation you are having in your project

I wanted to create a rigid body of a satellite dish, but the default behavior creates a very complex set of collision shapes when I just wanted a simple convex hull:

image

I tried to hack around it by making a simplified convex hull with the detailed mesh as a child:

image

This sort of works, but it still imports the mesh for the rigid shape, is limited to just 1 shape, and also goes through some algorithm to "simplify" the shape, but actually ends up adding more points to it, like the tip only had 1 point, and after the conversion, it ended up with 4:

image

Describe the feature / enhancement and how it helps to overcome the problem or limitation

It would nice to be able to explicitly specify convex mesh shapes for rigid bodies, much like you can do with the node hierarchy in Godot.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Option 1:

  • Have a mesh in blender with the suffix "-rigidconvcolonly", which will create a convex collision shape on a rigid body, and then the actual mesh (if desired) can be a child of this.

Option 2:

  • Create an empty that has the suffix "-rigid"
  • Child of this could have the other collision generating things, "-convcolonly", etc. to generate convex shapes from a simplified mesh.
  • Mesh children without collision suffixes would just follow the rigid body.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Core importer functionality -- can't be worked around.

Is there a reason why this should be core and not an add-on in the asset library?

Ditto.

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

2 participants