From 62379de9ecc81fb42b7c2a0d2b8e3e1b02d63f38 Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sat, 25 May 2024 10:36:34 +0200 Subject: feat: add simple inverse-kinematics solver for multibodies (#632) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add a simple jacobian-based inverse-kinematics implementation for multibodies * feat: add 2d inverse kinematics example * feat: make forward_kinematics auto-fix the root’s degrees of freedom * feat: add 3d inverse kinematics example * chore: update changelog * chore: clippy fixes * chore: more clippy fixes * fix tests --- src/pipeline/physics_pipeline.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pipeline') diff --git a/src/pipeline/physics_pipeline.rs b/src/pipeline/physics_pipeline.rs index 3884e19..95e408f 100644 --- a/src/pipeline/physics_pipeline.rs +++ b/src/pipeline/physics_pipeline.rs @@ -469,10 +469,10 @@ impl PhysicsPipeline { // TODO: do this only on user-change. // TODO: do we want some kind of automatic inverse kinematics? for multibody in &mut multibody_joints.multibodies { - multibody.1.update_root_type(bodies); - // FIXME: what should we do here? We should not - // rely on the next state here. multibody.1.forward_kinematics(bodies, true); + multibody + .1 + .update_rigid_bodies_internal(bodies, true, false, false); } self.detect_collisions( -- cgit