aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2022-12-04 18:27:38 +0100
committerSébastien Crozet <developer@crozet.re>2022-12-11 15:22:36 +0100
commit849f398031c61b4894d5b8ca229037c026c9186d (patch)
treedf11d0fc98fac961318d70b5704882a74927e437 /src/dynamics
parent87feb3a48d8dc006ad6050b4227cf3d02028088d (diff)
downloadrapier-849f398031c61b4894d5b8ca229037c026c9186d.tar.gz
rapier-849f398031c61b4894d5b8ca229037c026c9186d.tar.bz2
rapier-849f398031c61b4894d5b8ca229037c026c9186d.zip
Add a dynamic ray-cast vehicle controller
Diffstat (limited to 'src/dynamics')
-rw-r--r--src/dynamics/rigid_body.rs6
1 files changed, 6 insertions, 0 deletions
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<Real> {
+ &self.mprops.world_com
+ }
+
/// The mass-properties of this rigid-body.
#[inline]
pub fn mass_properties(&self) -> &MassProperties {