# Robot arm with shapes and bones

**URL:** <https://forum.babylonjs.com/t/robot-arm-with-shapes-and-bones/43726>\
**Category:** Questions\
**Created:** [August 31, 2023, 5:54pm UTC](https://forum.babylonjs.com/t/robot-arm-with-shapes-and-bones/43726 "2023-08-31T17:54:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gfxnoob](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gfxnoob/32/32783_2.png) [@gfxnoob](https://forum.babylonjs.com/u/gfxnoob)\
**Post date:** [August 31, 2023, 5:54pm UTC](https://forum.babylonjs.com/t/robot-arm-with-shapes-and-bones/43726/1 "2023-08-31T17:54:43Z")

</div>

I am trying to create a robot arm with bones and skeletons. I want to drag the arm in screen space and it should respect each joints.

 ![Screenshot 2023-08-31 231942](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/8/3/831fbd0412ba9a97845339224a4b188c78740dee.png)

I have seen physics joint but for my use case I believe I do not need them. How can I model this with bones and skeletons. I need to have various kind of joints like ball joint , socket joint, hinge joint(as in the arm) etc.

Can you please provide a very minimal example with just ball joint?

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [August 31, 2023, 8:36pm UTC](https://forum.babylonjs.com/t/robot-arm-with-shapes-and-bones/43726/2 "2023-08-31T20:36:47Z")

</div>

You may want to check out [Bones and Skeletons | Babylon.js Documentation (babylonjs.com)](https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons#boneikcontroller)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [August 31, 2023, 8:37pm UTC](https://forum.babylonjs.com/t/robot-arm-with-shapes-and-bones/43726/3 "2023-08-31T20:37:03Z")

</div>

Ahhhhhhh you beat me to it lol 🙂

---

<div class="post-metadata">

**Author:** ![gfxnoob](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gfxnoob/32/32783_2.png) [@gfxnoob](https://forum.babylonjs.com/u/gfxnoob)\
**Post date:** [September 1, 2023, 2:27am UTC](https://forum.babylonjs.com/t/robot-arm-with-shapes-and-bones/43726/4 "2023-09-01T02:27:41Z")

</div>

I have seen the topic on bones and skeletons. But i wonder how can i model the different kind of joints. I.e Contrain the bones

---

<div class="post-metadata">

**Author:** ![jeremy-coleman](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jeremy-coleman/32/15493_2.png) [@jeremy-coleman](https://forum.babylonjs.com/u/jeremy-coleman)\
**Post date:** [September 1, 2023, 5:34am UTC](https://forum.babylonjs.com/t/robot-arm-with-shapes-and-bones/43726/5 "2023-09-01T05:34:52Z")

</div>

search for the babylon classes that you think are of interest, and you will find many fruitful examples. the search indexing is pretty terrible on the backend, so just try to search for terms that will be in a playground as the leading word.

> **[Playground search page | Babylon.js Documentation](https://doc.babylonjs.com/playground)**
>
> Playground earch page for Babylon.js documentation site

these docs and playground prob more relevant to you

> **[Constraints | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/physics/constraints)**
>
> Learn all about using Constraints with Babylon.js.

but also… i saw they have physics v3 plugin in the works, so idk. maybe if you need something like NOW , use three. but, i’d say if you want it to work a year from now, use babylon for sure.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [September 1, 2023, 11:16am UTC](https://forum.babylonjs.com/t/robot-arm-with-shapes-and-bones/43726/6 "2023-09-01T11:16:47Z")

</div>

> [@jeremy-coleman](#):
>
> i saw they have physics v3 plugin in the works

It’s not v3, it’s all improvements to v2 😅

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [September 1, 2023, 11:18am UTC](https://forum.babylonjs.com/t/robot-arm-with-shapes-and-bones/43726/7 "2023-09-01T11:18:48Z")

</div>

If you want to go deeper into this subject, you’ll have to research about inverse kinematics [Inverse kinematics - Wikipedia](https://en.wikipedia.org/wiki/Inverse_kinematics) as that’s what ultimately moves the IK controller

---

<div class="post-metadata">

**Author:** ![jeremy-coleman](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jeremy-coleman/32/15493_2.png) [@jeremy-coleman](https://forum.babylonjs.com/u/jeremy-coleman)\
**Post date:** [September 1, 2023, 11:46am UTC](https://forum.babylonjs.com/t/robot-arm-with-shapes-and-bones/43726/8 "2023-09-01T11:46:02Z")

</div>

lol, thats good
