Inverse Kinematics

I’m trying to set up inverse kinematics for a robot arm in Babylon.js. I’ve successfully set up a skeleton for a GLTF model, but I’m encountering issues with the mesh placement, and the code doesn’t seem to be solving the pose correctly for a moving target ball.

Current Status:

  1. The skeleton is in place, and I’ve loaded a GLTF model for the robot arm.
  2. However, the mesh isn’t positioned correctly. It seems to be displaced from where it should be, and I’m struggling to identify the root cause of this issue.
  3. Additionally, I’m attempting to use inverse kinematics to control the robot arm’s pose in response to a moving target ball. Unfortunately, the current code doesn’t seem to be achieving the desired results.

Here is a complete playground with a skeleton created manually and configured to follow a ball

IK | Babylon.js Playground (

I would greatly appreciate it if anyone could provide insights, suggestions, or perhaps even point out potential pitfalls in my approach. If you have successfully implemented inverse kinematics for robot arms in Babylon.js or have encountered similar issues, your guidance would be invaluable.

I found a few topics that relate to this issue and that helped me get to this point but i could not solve this issue:

Check also my thread and PG, I decided to write from scratch my IK algorithm because I don’t understand how bones work in babylon…

Indeed, I’ve observed the recent modifications you made to the playground, and it’s an impressive demonstration. Regrettably, the integration with bones didn’t quite pan out. My objective here is to grasp the workings of Babylon in this context, enabling me to progress with the development of a new GLTF loader extension capable of utilizing Denavit–Hartenberg parameters. Unfortunately, I am still a newbie to this library and the migration from other engines has been slow.

Hello! Checking the console of the PG showed this:

Additionally, I think the BoneIKController won’t be enough if you want to move all of the robot bones, as from the docs: Bones and Skeletons | Babylon.js Documentation (

The BoneIKController class is modeled after Blender’s IK Bone Constraint, but is currently limited to 2 bones.

Thank you Carol for pointing it out. Indeed in my experiments, I noticed it was working only for two bones but I thought it was my lack of understanding of the API