# \[solved\] Joint / bone controlled mesh animation

**URL:** https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546
**Category:** Animation
**Created:** [March 14, 2022, 12:06am UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546 "2022-03-14T00:06:25Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![DSK](https://forum.castle-engine.io/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@DSK](https://forum.castle-engine.io/u/DSK)
#### Post date: [March 14, 2022, 12:06am UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546/1 "2022-03-14T00:06:25Z")

</div>

Is there currently any mechanism to animate a skinned model by programmatically updating bone joint angles?

My interest would be to e.g. implement inverse kinematics for accurate walking animation based on foot placement, and other complex behaviours which cannot be achieved by stored animation. And also mechanisms to allow skins to be switched but motion controllable with a unified interface.

I imagine this would require GPU implementation to move the mesh vertices according to the bone transformations, and realistically deform the mesh near joints, maintaining volume etc.

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [March 14, 2022, 10:01pm UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546/2 "2022-03-14T22:01:06Z")

</div>

Indeed, in short – it’s not ready yet, and it will be done by making glTF skinned animation on GPU. This is mentioned on our roadmap [Roadmap | Castle Game Engine](https://castle-engine.io/roadmap#_load_and_animate_gltf_more_efficiently) (" Load and animate glTF more efficiently"). It’s quite important for me, and will definitely happen in 2022, I hope in Q2 of 2022.

Longer description: We have 2 approaches to skinned animation in CGE.

1. glTF skinned animation. This is a modern approach that can be very efficient, and such animation can be exported e.g. from Blender-\>glTF already.

2. There is another approach to skinned animation using H-Anim: [H-Anim component | Castle Game Engine](https://castle-engine.io/x3d_implementation_hanim.php) . The result of bone movement is calculated at runtime in this case, so basically it actually has the feature you ask for. However…

---

<div class="post-metadata">

### Author: ![DSK](https://forum.castle-engine.io/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@DSK](https://forum.castle-engine.io/u/DSK)
#### Post date: [March 15, 2022, 7:47am UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546/3 "2022-03-15T07:47:56Z")

</div>

Brilliant! So do you think the glTF skinned animation will be ready around the end of June, say?

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [March 15, 2022, 8:08am UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546/4 "2022-03-15T08:08:48Z")

</div>

Yes. I mean around the end of June 2022, it will be in the version where it is performed on GPU and the bones can be moved from code (and affect the skin properly).

The glTF skinned animation itself (without above features) works already, i.e. skinned animation that you just design in e.g. Blender and export to glTF works OK already 🙂

---

<div class="post-metadata">

### Author: ![ultidonki](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/ultidonki/32/382_2.png) [@ultidonki](https://forum.castle-engine.io/u/ultidonki)
#### Post date: [March 16, 2022, 10:49pm UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546/5 "2022-03-16T22:49:37Z")

</div>

I’m just a beginner in 3D animation, but just so I understand:

Would this mean you could have a ‘Head’ bone on the player’s model, and then get the head to look around the level - eg. rotate 30 degrees left, or rotate 10 degrees up, so it looks like the player is looking around the level when you come close to different points of interest? Like looking down a hole, or at a treasure chest?

If so, I think that would be a very cool feature! 😀

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [March 17, 2022, 4:56am UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546/6 "2022-03-17T04:56:06Z")

</div>

> [@ultidonki](#):
>
> Would this mean you could have a ‘Head’ bone on the player’s model, and then get the head to look around the level - eg. rotate 30 degrees left, or rotate 10 degrees up, so it looks like the player is looking around the level when you come close to different points of interest? Like looking down a hole, or at a treasure chest?
> 
> If so, I think that would be a very cool feature! 😀

Yes, exactly. This will be possible – you will be able to rotate the head bone at runtime to look at any desired point.

---

<div class="post-metadata">

### Author: ![ultidonki](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/ultidonki/32/382_2.png) [@ultidonki](https://forum.castle-engine.io/u/ultidonki)
#### Post date: [March 17, 2022, 8:00pm UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546/7 "2022-03-17T20:00:23Z")

</div>

Thank you! That sounds like it’ll be a really fun feature to use! 😀

---

<div class="post-metadata">

### Author: ![Recongalina](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/recongalina/32/1530_2.png) [@Recongalina](https://forum.castle-engine.io/u/Recongalina)
#### Post date: [August 29, 2024, 2:22am UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546/8 "2024-08-29T02:22:25Z")

</div>

Hello!  
Has this feature been implemented yet?  
If so, where can I see examples?

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [August 29, 2024, 2:02pm UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546/9 "2024-08-29T14:02:25Z")

</div>

I know it’s been some time, but it is still a TODO I’m afraid. It’s part of our roadmap ( [Roadmap | Manual | Castle Game Engine](https://castle-engine.io/roadmap#gltf_efficient) – “We should also perform skinning fully on GPU” ). It _is_ important, we _will_ implement it, it just competes with a few other things that are important 🙂

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [December 3, 2025, 1:33pm UTC](https://forum.castle-engine.io/t/solved-joint-bone-controlled-mesh-animation/546/10 "2025-12-03T13:33:03Z")

</div>

I’m updating this old thread to let everyone know this is _done_ now 🙂

That is, we perform skinned animation efficiently using GPU shaders (with a proper fallback on CPU for ancient GPUs). In every case, you can change joints at runtime using Pascal code, and the corresponding mesh will update accordingly. Effectively, you have efficient way to control skinned animation from Pascal code. Links:

- Our example [animate\_bones\_by\_code](https://github.com/castle-engine/castle-engine/tree/master/examples/animations/animate_bones_by_code) shows this (playing skinned animation designed, and/or controlled by Pascal logic, also a “crowd” demo).
- More info at [news from November 2025](https://castle-engine.io/wp/2025/12/01/november-improvements-huge-animation-upgrade-guidelines-about-ai-usage-codeberg-mirror-various-fixes/) and in [skinned animation and Skin node docs](https://castle-engine.io/skin).
