From d2ebb25c227e239aa283b989cf560bf3739a1c39 Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sun, 15 Jan 2023 12:23:32 +0100 Subject: Add accessor to get the locked axes of a rigid-body --- src/dynamics/rigid_body.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs index 78132b2..b850f66 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -184,6 +184,12 @@ impl RigidBody { } } + /// The axes along which this rigid-body cannot translate or rotate. + #[inline] + pub fn locked_axes(&self) -> LockedAxes { + self.mprops.flags + } + #[inline] /// Locks or unlocks all the rotations of this rigid-body. pub fn lock_rotations(&mut self, locked: bool, wake_up: bool) { -- cgit