From 849f398031c61b4894d5b8ca229037c026c9186d Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sun, 4 Dec 2022 18:27:38 +0100 Subject: Add a dynamic ray-cast vehicle controller --- src/dynamics/rigid_body.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/dynamics') diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs index a6384b7..26be983 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -146,6 +146,12 @@ impl RigidBody { } } + /// The world-space center-of-mass of this rigid-body. + #[inline] + pub fn center_of_mass(&self) -> &Point { + &self.mprops.world_com + } + /// The mass-properties of this rigid-body. #[inline] pub fn mass_properties(&self) -> &MassProperties { -- cgit