amethyst / amethyst/amethyst-rhusics
Implement debug drawing system for physical entities.
- 主要语言
- Rust
- 星标
- 9
- 派生
- 12
- PR 合并指标
- 30 天内没有已合并 PR
描述
Given the fairly advanced mathematical models involved with simulating rigid body physics, it becomes difficult for users of the library to analytically determine what is happening in the physics world through debug messages alone. For this reason, the amethyst integration of rhusics should include facilities to draw "debug geometry" that is representative of the underlying parameters to the simulation. This addition should support the following features:
* Velocity vectors with direction and scale proportional to their physical quantities.
* Collision shape wireframes to observe the dimension and orientation of collision geometry and understood by the physics engine.
* Contact manifold highlighting to observe interactions between collision geometry under simulation.
This addition can be implemented in multiple parts.
1. Creating a `specs` system implementation that aggregates all existing collision shape, velocity and rigid body components. For each of these components, debug line geometry is constructed by inspecting the properties of the component. This geometry is assigned to the entity as an additional (perhaps custom) mesh component with vertex structure [Pos, Color].
2. Creating a `specs` system implementation that reads from the collision event queue and generates mesh geometry from contact manifold. Can also include collision geometry of involved bodies to support contact "ghosting" allowing for a visual representation of a contact to persist after the contact has been resolved.
3. A custom pass is implemented to render these debug meshes using a barycentric coordinate wireframe fragment shader.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。