Skip to content

Commit

Permalink
Merge pull request #527 from Aceeri/debug-render-com
Browse files Browse the repository at this point in the history
Calculate world center of mass from local com in debug renderer
  • Loading branch information
sebcrozet authored Jan 24, 2024
2 parents 51f5bd6 + 2ac1898 commit d84aa82
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pipeline/debug_render_pipeline/debug_render_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ impl DebugRenderPipeline {
[120.0 * coeff[0], 1.0 * coeff[1], 0.1 * coeff[2], coeff[3]],
[240.0 * coeff[0], 1.0 * coeff[1], 0.2 * coeff[2], coeff[3]],
];
let com = rb.mprops.world_com;

let com = rb
.position()
.transform_point(&rb.mprops.local_mprops.local_com);

for k in 0..DIM {
let axis = basis.column(k) * self.style.rigid_body_axes_length;
Expand Down

0 comments on commit d84aa82

Please sign in to comment.