# Matrix animation not interpolating

**URL:** <https://forum.babylonjs.com/t/matrix-animation-not-interpolating/39589>\
**Category:** Bugs\
**Created:** [April 3, 2023, 6:18pm UTC](https://forum.babylonjs.com/t/matrix-animation-not-interpolating/39589 "2023-04-03T18:18:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ephillips](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ephillips/32/29099_2.png) [@ephillips](https://forum.babylonjs.com/u/ephillips)\
**Post date:** [April 3, 2023, 6:18pm UTC](https://forum.babylonjs.com/t/matrix-animation-not-interpolating/39589/1 "2023-04-03T18:18:33Z")

</div>

Behavior: Cube toggles between two keyframes with no interpolation  
Expected: Cube should smoothly animate / interpolate between the keyframe matrices

Not sure if freezing the matrix at a value is the best way to set it, but the console log only outputs the two keyframes and never an interpolated value (despite being called at the expected rate).

> **[Babylon.js Playground](https://playground.babylonjs.com/#7V0Y1I%233005)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<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:** [April 3, 2023, 8:19pm UTC](https://forum.babylonjs.com/t/matrix-animation-not-interpolating/39589/2 "2023-04-03T20:19:57Z")

</div>

As it is pretty slow, it is disabled by default. You can turn it on like below:

```auto
BABYLON.Animation.AllowMatricesInterpolation = true;

```

> **[Babylon.js Playground](https://playground.babylonjs.com/#7V0Y1I%233007)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![ephillips](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ephillips/32/29099_2.png) [@ephillips](https://forum.babylonjs.com/u/ephillips)\
**Post date:** [April 4, 2023, 6:24pm UTC](https://forum.babylonjs.com/t/matrix-animation-not-interpolating/39589/3 "2023-04-04T18:24:04Z")

</div>

Ahh, good to know. Thanks for the help.
