From 5c3ee85dc3faf0fc1dc43a6cb61c44d316bd8f14 Mon Sep 17 00:00:00 2001 From: Johannes Vollmer <32042925+johannesvollmer@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:18:44 +0200 Subject: [PATCH 1/2] fix documentation - local vs world space in apply_force_at_point --- src/dynamics/rigid_body/forces.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dynamics/rigid_body/forces.rs b/src/dynamics/rigid_body/forces.rs index e4cb4256..412230e8 100644 --- a/src/dynamics/rigid_body/forces.rs +++ b/src/dynamics/rigid_body/forces.rs @@ -152,7 +152,8 @@ impl ExternalForce { self } - /// Applies the given world-space `force` at a local `point`, which will also cause torque to be applied. + /// Applies the given `force` at the specified `point`, which will also cause torque to be applied. + /// The force, the point, and the center of mass must be given in world-space. pub fn apply_force_at_point( &mut self, force: Vector, From c62f637ff5bb699b0f50fdb5f6095b9979a45104 Mon Sep 17 00:00:00 2001 From: Joona Aalto Date: Sun, 8 Dec 2024 17:58:10 +0200 Subject: [PATCH 2/2] Tweak docs and add them for `ExternalImpulse` too --- src/dynamics/rigid_body/forces.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dynamics/rigid_body/forces.rs b/src/dynamics/rigid_body/forces.rs index caaa6dd1..2116077e 100644 --- a/src/dynamics/rigid_body/forces.rs +++ b/src/dynamics/rigid_body/forces.rs @@ -155,7 +155,8 @@ impl ExternalForce { } /// Applies the given `force` at the specified `point`, which will also cause torque to be applied. - /// The force, the point, and the center of mass must be given in world-space. + /// + /// The force, point, and center of mass must be given in world space. pub fn apply_force_at_point( &mut self, force: Vector, @@ -443,7 +444,9 @@ impl ExternalImpulse { self } - /// Applies the given world-space `impulse` at a local `point`, which will also cause an angular impulse to be applied. + /// Applies the given `impulse` at the specified `point`, which will also cause an angular impulse to be applied. + /// + /// The impulse, point, and center of mass must be given in world space. pub fn apply_impulse_at_point( &mut self, impulse: Vector,