setPivotMatrix behaves strange in combination with cannon.js physics

After upgrading to babylon.JS 3.2 / 4.0 I noticed, that most of my (static) physical objects behaved strange and started moving through the scene … I analyzed the issue and found out, that the culprit was the assignment of a different Pivot using setPivotMatrix for certain meshes.

Please see this Playground:
The static box starts and keeps on moving although its mass is set to 0.

In the // problematic section .., a PivotMatrix is set.
I already read your article about the breaking changes concerning the setPivotMatrix method and it’s second (boolean) parameter but I’ve tried everything to get this issue fixed! ( also using false or true did not solve this issue.

Do you know, how to solve this issue and how to use the pivot matrices in combination with cannon.js again? Any help would be greatly appreciated! :smiley:

Thanks in advance and keep up your awesome work on babylon.JS !
:smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts:


I wonder if it could be related to some of the physics fixes done by @trevordev on the 4.0 release.

I know some pivot bugs have been fixed around this space on 4.0.

@trevordev could you have a quick look at it ?

1 Like

@Christopher_Stock Unfortunately reverting the cannonjsplugin file did not seem to resolve this so I have a couple questions to make sure I can get this fix right.

Other than not moving when mass is set to 0 is there any other behavior you need based on these pivots?

Are you ever using pivots and setting mass?

Can you confirm that the collision worked as expected when another object collided with them in 3.2?

What was the reason you ended up using pivots?