# Different behaviour of Physics Constraint limit when upgrading from 6.2 to 6.6

**URL:** <https://forum.babylonjs.com/t/different-behaviour-of-physics-constraint-limit-when-upgrading-from-6-2-to-6-6/41317>\
**Category:** Bugs\
**Tags:** havok\
**Created:** [June 2, 2023, 10:56am UTC](https://forum.babylonjs.com/t/different-behaviour-of-physics-constraint-limit-when-upgrading-from-6-2-to-6-6/41317 "2023-06-02T10:56:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Kerr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/joe_kerr/32/39017_2.png) [@Joe\_Kerr](https://forum.babylonjs.com/u/Joe_Kerr)\
**Post date:** [June 2, 2023, 10:56am UTC](https://forum.babylonjs.com/t/different-behaviour-of-physics-constraint-limit-when-upgrading-from-6-2-to-6-6/41317/1 "2023-06-02T10:56:41Z")

</div>

Hi everyone,

I have just upgraded from version 6.2 to 6.6. I double checked the changelog and could not find any breaking changes.

Please have a look here: [https://playground.babylonjs.com/#YQHYKD#2](https://playground.babylonjs.com/#YQHYKD#2) (you’ll see)

Some details:

- In 6.2 everything ok.

- In the above playground it is just the upper arm that freaks out - if I set the minLimit and maxLimit of the constraint to zero (Line 58).

- However, notice that even when I set the minLimit/maxLimit != 0, the arm keeps rotating forever. See bool on Line 29. This seems strange as well.

I am unsure how to proceed now. Is my config faulty which went through in earlier versions? Or did something break inbetween versions or so?

Best wishes  
Joe

P.S. Not sure if required, but here is the full model: [Babylon.js Playground](https://playground.babylonjs.com/#J8FG9I)

---

<div class="post-metadata">

**Author:** ![jamessimo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jamessimo/32/26847_2.png) [@jamessimo](https://forum.babylonjs.com/u/jamessimo)\
**Post date:** [June 2, 2023, 12:37pm UTC](https://forum.babylonjs.com/t/different-behaviour-of-physics-constraint-limit-when-upgrading-from-6-2-to-6-6/41317/2 "2023-06-02T12:37:54Z")

</div>

I have no idea how the playground manages this. But Havok did get a bump from 1.0.0 to 1.0.1 during the first month of V6 so no idea if that may of caused it?

---

<div class="post-metadata">

**Author:** ![Joe\_Kerr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/joe_kerr/32/39017_2.png) [@Joe\_Kerr](https://forum.babylonjs.com/u/Joe_Kerr)\
**Post date:** [June 2, 2023, 1:07pm UTC](https://forum.babylonjs.com/t/different-behaviour-of-physics-constraint-limit-when-upgrading-from-6-2-to-6-6/41317/3 "2023-06-02T13:07:59Z")

</div>

Huh! So I was trying to find the Havok changelog. Found this instead: [Fix bug where constraint perp axes were ignored by eoineoineoin · Pull Request #13859 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/pull/13859)

Going back to the playground, if I change the perpAxes of the leftUpperArmPhy.body to BABYLON.Vector3(0, 1, 0) and ensure that the goNuts variable is false, it seems to work.

Ok, going further back to the full model, it seems if you mess with the wrong perpAxis you can more reliably make the meshes explode.

No idea if the physics engine is supposed to explode if you choose a wrong axis 😵

P.S. Full model with adapted perpAxes: [https://playground.babylonjs.com/#J8FG9I#1](https://playground.babylonjs.com/#J8FG9I#1) (working)

---

<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:** [June 2, 2023, 1:23pm UTC](https://forum.babylonjs.com/t/different-behaviour-of-physics-constraint-limit-when-upgrading-from-6-2-to-6-6/41317/4 "2023-06-02T13:23:14Z")

</div>

cc @eoin to take a look when possible

---

<div class="post-metadata">

**Author:** ![eoin](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@eoin](https://forum.babylonjs.com/u/eoin)\
**Post date:** [June 6, 2023, 2:49pm UTC](https://forum.babylonjs.com/t/different-behaviour-of-physics-constraint-limit-when-upgrading-from-6-2-to-6-6/41317/5 "2023-06-06T14:49:31Z")

</div>

Hey, so this is definitely something we could clean up; the issue is that you only specified a ‘perpAxisA’/‘perpAxisB’, which just happened to be the default value used for ‘axisA’/‘axisB’, ([Babylon.js/havokPlugin.ts at master · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/Physics/v2/Plugins/havokPlugin.ts#L1311)) which, in turn caused a singularity in the solver.

If you specify both the axis and perp axis, it’ll fix the jittering (but not sure if these are the real values you want to use):

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