Merge pull request #527 from Aceeri/debug-render-com
Calculate world center of mass from local com in debug renderer
This commit is contained in:
@@ -264,7 +264,10 @@ impl DebugRenderPipeline {
|
|||||||
[120.0 * coeff[0], 1.0 * coeff[1], 0.1 * coeff[2], coeff[3]],
|
[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]],
|
[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 {
|
for k in 0..DIM {
|
||||||
let axis = basis.column(k) * self.style.rigid_body_axes_length;
|
let axis = basis.column(k) * self.style.rigid_body_axes_length;
|
||||||
|
|||||||
Reference in New Issue
Block a user