# How to make arm point at an object?

**URL:** <https://forum.babylonjs.com/t/how-to-make-arm-point-at-an-object/12730>\
**Category:** Questions\
**Created:** [July 22, 2020, 5:39am UTC](https://forum.babylonjs.com/t/how-to-make-arm-point-at-an-object/12730 "2020-07-22T05:39:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ozRocker](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ozrocker/32/186_2.png) [@ozRocker](https://forum.babylonjs.com/u/ozRocker)\
**Post date:** [July 22, 2020, 5:39am UTC](https://forum.babylonjs.com/t/how-to-make-arm-point-at-an-object/12730/1 "2020-07-22T05:39:05Z")

</div>

I’m trying to straighten out the arm then make it point towards an object. When I move the bones in local space it will move, but when I try to move in world space nothing happens. Anyone know how to get this guy to point to the sphere?

Here is my sad attempt [https://playground.babylonjs.com/#ZVE9LW#10](https://playground.babylonjs.com/#ZVE9LW#10)

---

<div class="post-metadata">

**Author:** ![gbz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gbz/32/23780_2.png) [@gbz](https://forum.babylonjs.com/u/gbz)\
**Post date:** [July 22, 2020, 9:58am UTC](https://forum.babylonjs.com/t/how-to-make-arm-point-at-an-object/12730/2 "2020-07-22T09:58:57Z")

</div>

@ozRocker, here’s an attempt using [`BoneIKController`](https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons):

[https://www.babylonjs-playground.com/#1EVNNB#167](https://www.babylonjs-playground.com/#1EVNNB#167)

https://www.babylonjs-playground.com/#1EVNNB#167

Not sure why the orange SkeletonViewer portion for the right forearm and hand are in the wrong placement after using a `BoneIKController`, which also occurs in the demo in the official Babylon docs: [https://www.babylonjs-playground.com/#1EVNNB#168](https://www.babylonjs-playground.com/#1EVNNB#168)

---

<div class="post-metadata">

**Author:** ![ozRocker](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ozrocker/32/186_2.png) [@ozRocker](https://forum.babylonjs.com/u/ozRocker)\
**Post date:** [July 23, 2020, 1:06am UTC](https://forum.babylonjs.com/t/how-to-make-arm-point-at-an-object/12730/3 "2020-07-23T01:06:59Z")

</div>

Thank you for the playground demo, unfortunately I need to get it working with the .GLB file. I’ve incorporated your playground into mine but I still can’t get it to work [https://playground.babylonjs.com/#ZVE9LW#15](https://playground.babylonjs.com/#ZVE9LW#15)

---

<div class="post-metadata">

**Author:** ![gbz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gbz/32/23780_2.png) [@gbz](https://forum.babylonjs.com/u/gbz)\
**Post date:** [July 23, 2020, 2:30am UTC](https://forum.babylonjs.com/t/how-to-make-arm-point-at-an-object/12730/4 "2020-07-23T02:30:49Z")

</div>

![Screenshot (1222)](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/4/4e73df2293fdefe7ea15659b0f6cc2af11e50132.jpeg)

When importing your avatar.glb file into Blender, I noticed an extra transform node named Armature as the parent of Armature\_0. Armature has a rotation that corresponds to a 180 deg rotation on the x-axis. When using a model in Babylon JS, I think we should make sure that the model has Location xyz (0, 0, 0), Rotation XYZ Euler (0, 0, 0), and Scale (1, 1, 1). This Armature transform node does not follow this rule.

 ![Screenshot (1221)](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/0/064370b5cbdcb83fd927b0bcd71d24e3c506e6c0.jpeg)

In the updated model, I removed that extra transform node parent from Armature\_0 and made sure that both Armature\_0 and the mesh node avatar have (0, 0, 0) Location and Rotation and (1, 1, 1) Scale.

---

<div class="post-metadata">

**Author:** ![ozRocker](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ozrocker/32/186_2.png) [@ozRocker](https://forum.babylonjs.com/u/ozRocker)\
**Post date:** [July 23, 2020, 2:37am UTC](https://forum.babylonjs.com/t/how-to-make-arm-point-at-an-object/12730/5 "2020-07-23T02:37:54Z")

</div>

I understand, this would be best practise, however I’m stuck with this particular GLB model because its being used in a larger framework. When Blender exports armature to GLB it puts it into this format.  
Unfortunately I cannot alter it 'cos it will break other things

---

<div class="post-metadata">

**Author:** ![gbz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gbz/32/23780_2.png) [@gbz](https://forum.babylonjs.com/u/gbz)\
**Post date:** [July 23, 2020, 3:19am UTC](https://forum.babylonjs.com/t/how-to-make-arm-point-at-an-object/12730/6 "2020-07-23T03:19:49Z")

</div>

Ah, that makes sense. There may be an upcoming solution that can cover all model configurations, as being discussed in [Return to Rest not Behaving as Expected?](https://forum.babylonjs.com/t/return-to-rest-not-behaving-as-expected/12570/48)

---

<div class="post-metadata">

**Author:** ![ozRocker](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ozrocker/32/186_2.png) [@ozRocker](https://forum.babylonjs.com/u/ozRocker)\
**Post date:** [July 27, 2020, 12:36am UTC](https://forum.babylonjs.com/t/how-to-make-arm-point-at-an-object/12730/7 "2020-07-27T00:36:36Z")

</div>

I can’t get IK to work with GLB bones but I feel like I’ve gotten closer here. [Babylon.js Playground](https://playground.babylonjs.com/#HKHA0N) Something is off though, like the axis is the wrong way around, or there needs to be an offset applied

---

<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:** [July 27, 2020, 1:21pm UTC](https://forum.babylonjs.com/t/how-to-make-arm-point-at-an-object/12730/8 "2020-07-27T13:21:05Z")

</div>

Maybe @Drigax could help as he is definitely my new bones/animations hero 🙂
