Default to trimesh for generated collision shapes in Advanced Import Settings #89461
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.
This avoids using convex decomposition every time collision is enabled on a mesh, which can be extremely slow on complex meshes (such as entire levels).
This doesn't break compatibility since default values are saved to
.import
files, unlike.tscn
/.tres
andproject.godot
.We may want to consider though that only StaticBody can use trimesh collision shapes. Other PhysicsBody types can only use convex shapes or primitive shapes, so perhaps we should automatically change the default according to the selected PhysicsBody type. (In this case, simple convex decomposition should be preferred for dynamic objects as it's faster).