-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
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.
- 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]. - 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. - A custom pass is implemented to render these debug meshes using a barycentric coordinate wireframe fragment shader.
apage43 and keeslinp
Metadata
Metadata
Assignees
Labels
No labels