From 2ac1898f82e5217a6232d8b9c99a89038d29e80a Mon Sep 17 00:00:00 2001 From: Aceeri Date: Tue, 26 Sep 2023 17:45:37 -0700 Subject: [PATCH] Calculate world center of mass from local com in debug renderer --- src/pipeline/debug_render_pipeline/debug_render_pipeline.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs b/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs index bb9fd78b2..45a396621 100644 --- a/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs +++ b/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs @@ -242,7 +242,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;