# Persisting a Bone Rotation During Character Animation

**URL:** <https://forum.babylonjs.com/t/persisting-a-bone-rotation-during-character-animation/46735>\
**Category:** Questions\
**Created:** [December 26, 2023, 5:54pm UTC](https://forum.babylonjs.com/t/persisting-a-bone-rotation-during-character-animation/46735 "2023-12-26T17:54:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Daly](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jason_daly/32/19814_2.png) [@Jason\_Daly](https://forum.babylonjs.com/u/Jason_Daly)\
**Post date:** [December 26, 2023, 5:54pm UTC](https://forum.babylonjs.com/t/persisting-a-bone-rotation-during-character-animation/46735/1 "2023-12-26T17:54:03Z")

</div>

Hi,

I posted a reply to a solved issue at the following link: [Unable to apply rotation to a Bone, but its TransformNode works](https://forum.babylonjs.com/t/unable-to-apply-rotation-to-a-bone-but-its-transformnode-works/38927)

Since the original issue in the thread was solved, to avoid this from being buried, I’m reposting the issue and solution here should this be helpful to someone with the same issue. Following is the issue:

> Is there a way to maintain this rotation though on an animated character?  
> For example, if this rotation is applied then an idle animation is played, the animation overtakes the rotation applied. Is there a weight that can be applied to the rotation to allow it to apply while an animation is playing (i.e. to create the effect of the character looking sideways while the idle animation is playing)?  
> See the current result that I’m getting when applying the rotation, then playing an animation a few seconds later:  
> ![test rpm (1)](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/5/95380ee35cf96a9ad8da95ee911c48eb1239b82a.gif)

---

<div class="post-metadata">

**Author:** ![Jason\_Daly](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jason_daly/32/19814_2.png) [@Jason\_Daly](https://forum.babylonjs.com/u/Jason_Daly)\
**Post date:** [December 26, 2023, 5:54pm UTC](https://forum.babylonjs.com/t/persisting-a-bone-rotation-during-character-animation/46735/2 "2023-12-26T17:54:35Z")

</div>

Here’s the solution that works:

Before playing the animation. removing the neck animations within the \_targetedAnimations array (inside the AnimationGroup) allows the rotation to persist. See the following code snippet:

`animation._targetedAnimations = animation._targetedAnimations.filter(tAnim => tAnim.target.name != "Neck");`

Thanks to some insights shared by Kyle Wetton at the following link: [How to Create an Interactive 3D Character with Three.js | Codrops](https://tympanus.net/codrops/2019/10/14/how-to-create-an-interactive-3d-character-with-three-js/)
