Give access to the world-space mass properties of rigid-bodies

This commit is contained in:
Sébastien Crozet
2023-01-15 12:23:16 +01:00
parent d2ebb25c22
commit 89fc31f996
2 changed files with 3 additions and 3 deletions

View File

@@ -158,8 +158,8 @@ impl RigidBody {
/// The mass-properties of this rigid-body.
#[inline]
pub fn mass_properties(&self) -> &MassProperties {
&self.mprops.local_mprops
pub fn mass_properties(&self) -> &RigidBodyMassProps {
&self.mprops
}
/// The dominance group of this rigid-body.

View File

@@ -245,7 +245,7 @@ impl Default for RigidBodyAdditionalMassProps {
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
#[derive(Clone, Debug, PartialEq)]
/// The mass properties of this rigid-bodies.
/// The mass properties of a rigid-body.
pub struct RigidBodyMassProps {
/// Flags for locking rotation and translation.
pub flags: LockedAxes,