Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
Currently, the mesh collider must use the original data of the assigned mesh. Consequently, if the original mesh is highly complex, it can significantly decrease performance. While it's possible to assign the mesh collider with a simplified mesh, this means users would need to maintain two separate meshes, which increases complexity.
To address this, a bake panel could be introduced for the mesh collider, providing an additional option to configure the mesh collider.
Bake panel
Mesh simplify ratio (0-100%)
Mesh optimization
...
Bake process
The mesh collider component relies on the assigned mesh asset. When the mesh asset is updated, the mesh collider should also be baked to reflect the changes. The baked data is stored in a buffer asset.
Mesh optimization
Mesh simplification
Load process
During component initialization, the buffer asset containing the baked mesh data is acquired.
Data storage
The data is stored in a buffer asset, supporting two formats:
Converted mesh: Contains only vertex positions.
Indexed mesh: Includes both vertex positions and triangle faces.
Use Case
Currently, the mesh collider must use the original data of the assigned mesh. Consequently, if the original mesh is highly complex, it can significantly decrease performance. While it's possible to assign the mesh collider with a simplified mesh, this means users would need to maintain two separate meshes, which increases complexity.
To address this, a bake panel could be introduced for the mesh collider, providing an additional option to configure the mesh collider.
Bake panel
Bake process The mesh collider component relies on the assigned mesh asset. When the mesh asset is updated, the mesh collider should also be baked to reflect the changes. The baked data is stored in a buffer asset.
Load process During component initialization, the buffer asset containing the baked mesh data is acquired.
Data storage The data is stored in a buffer asset, supporting two formats:
Bonus
Problem Description
None
Proposed Solution
No response
How it works
No response
Alternatives Considered
None
Additional Information
No response